When we 503, do it in HTML
authorArt Cancro <ajc@citadel.org>
Tue, 11 Jan 2011 03:53:12 +0000 (22:53 -0500)
committerArt Cancro <ajc@citadel.org>
Tue, 11 Jan 2011 03:53:12 +0000 (22:53 -0500)
citadel/modules/wiki/serv_wiki.c
webcit/webcit.c

index e005e8609f071efb2184b769555a0ca3b9bcbd6c..12b9b9fa0242f6c938d7cc0970239b8952a71103 100644 (file)
@@ -422,7 +422,8 @@ void wiki_rev_callback(char *name, char *filename, char *partnum, char *disp,
        CtdlLogPrintf(CTDL_DEBUG, "callback found rev: %s\n", this_rev);
 
        /* Perform the patch */
-       fp = popen("patch -f -s -p0 --global-reject-file=/dev/null >/dev/null 2>/dev/null", "w");
+       //fp = popen("patch -f -s -p0 --global-reject-file=/dev/null >/dev/null 2>/dev/null", "w");
+       fp = popen("patch -f -s -p0 --global-reject-file=/dev/null >/dev/null 2>>/tmp/patcherr.txt", "w");
        if (fp) {
                /* Replace the filenames in the patch with the tempfilename we're actually tweaking */
                fprintf(fp, "--- %s\n", hecbd->tempfilename);
index de5380a13895a387121e023f1c780b5950f32886..3c094cd1e0c1fd1490640f4314a9e48419b1d5c4 100644 (file)
@@ -701,12 +701,14 @@ void session_loop(void)
        if (!WCC->connected) {
                if (GetConnected()) {
                        hprintf("HTTP/1.1 503 Service Unavailable\r\n");
-                       hprintf("Content-Type: text/plain\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;
                }