]> code.citadel.org Git - citadel.git/blobdiff - webcit/webcit.c
When we 503, do it in HTML
[citadel.git] / webcit / webcit.c
index a234824210c9cba351648a4b078ecaf3d03dcf89..8f51833deb32a180f9ebced1bc9ddc3177a9c016 100644 (file)
@@ -657,7 +657,17 @@ void session_loop(void)
         * connection now.
         */
        if (!WCC->connected) {
-               if (GetConnected ())
+               if (GetConnected()) {
+                       hprintf("HTTP/1.1 503 Service Unavailable\r\n");
+                       hprintf("Content-Type: text/html\r\n");
+                       begin_burst();
+                       wc_printf("<html><head><title>503 Service Unavailable</title></head><body>\n");
+                       wc_printf(_("This program was unable to connect or stay "
+                               "connected to the Citadel server.  Please report "
+                               "this problem to your system administrator.")
+                       );
+                       wc_printf("</body></html>\n");
+                       end_burst();
                        goto SKIP_ALL_THIS_CRAP;
        }