From: Art Cancro Date: Tue, 11 Jan 2011 03:53:12 +0000 (-0500) Subject: When we 503, do it in HTML X-Git-Tag: v8.11~980 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=639575323070fadad9cc0e2687741e07c0d42cdd When we 503, do it in HTML Conflicts: webcit/webcit.c --- diff --git a/citadel/modules/wiki/serv_wiki.c b/citadel/modules/wiki/serv_wiki.c index abaa71e1f..5f1845757 100644 --- a/citadel/modules/wiki/serv_wiki.c +++ b/citadel/modules/wiki/serv_wiki.c @@ -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); diff --git a/webcit/webcit.c b/webcit/webcit.c index a23482421..8f51833de 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -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("503 Service Unavailable\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("\n"); + end_burst(); goto SKIP_ALL_THIS_CRAP; }