From: Art Cancro Date: Mon, 20 Sep 2010 04:19:18 +0000 (-0400) Subject: Issue HTTP 502 and 503 errors instead of 200 followed by an error message, when appro... X-Git-Tag: v8.01~702^2~8 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=8be46952a09923e6b85131d8e5a679e9c11ea9af;hp=c3a1690866526314fd7dbc0c89c43190e514badb;p=citadel.git Issue HTTP 502 and 503 errors instead of 200 followed by an error message, when appropriate --- diff --git a/webcit/serv_func.c b/webcit/serv_func.c index 77b12888a..e812de381 100644 --- a/webcit/serv_func.c +++ b/webcit/serv_func.c @@ -183,6 +183,8 @@ int GetConnected (void) /* Server isn't ready for us? */ if (short_status != 2) { if (Status == 571) { + hprintf("HTTP/1.1 503 Service Unavailable\r\n"); + hprintf("Content-type: text/plain; charset=utf-8\r\n"); wc_printf(_("This server is already serving its maximum number of users and cannot accept any additional logins at this time. Please try again later or contact your system administrator.")); } else { @@ -190,6 +192,8 @@ int GetConnected (void) Status, _("Received unexpected answer from Citadel server; bailing out.") ); + hprintf("HTTP/1.1 502 Bad Gateway\r\n"); + hprintf("Content-type: text/plain; charset=utf-8\r\n"); } end_burst(); end_webcit_session(); @@ -218,7 +222,7 @@ int GetConnected (void) if (WCC->serv_info == NULL){ begin_burst(); wc_printf(_("Received unexpected answer from Citadel server; bailing out.")); - hprintf("HTTP/1.1 200 OK\r\n"); + hprintf("HTTP/1.1 502 Bad Gateway\r\n"); hprintf("Content-type: text/plain; charset=utf-8\r\n"); end_burst(); end_webcit_session();