X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fwebcit.c;h=4108ecb38c3971355b6f5ad650ed7cbd02c9b133;hb=c73091a2ae896b6be5aa94b911c1c89d76a85688;hp=bb36f989817eb26c53f2d03857a0f6fa6f3034bd;hpb=095de21d2211d73d50677a2f3f2ee6da59ead5a2;p=citadel.git
diff --git a/webcit/webcit.c b/webcit/webcit.c
index bb36f9898..4108ecb38 100644
--- a/webcit/webcit.c
+++ b/webcit/webcit.c
@@ -3,15 +3,10 @@
* persistent session to the Citadel server, handling HTTP WebCit requests as
* they arrive and presenting a user interface.
*
- * Copyright (c) 1996-2011 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
*
* This program is open source software. You can redistribute it and/or
* modify it under the terms of the GNU General Public License, version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
*/
#define SHOW_ME_VAPPEND_PRINTF
@@ -26,7 +21,7 @@ HashList *HandlerHash = NULL;
void stuff_to_cookie(int unset_cookie);
extern int GetConnected(void);
-
+extern int verbose;
void PutRequestLocalMem(void *Data, DeleteHashDataFunc DeleteIt)
{
@@ -138,12 +133,7 @@ void wDumpContent(int print_standard_html_footer)
*/
void output_headers( int do_httpheaders, /* 1 = output HTTP headers */
int do_htmlhead, /* 1 = output HTML
section and opener */
-
- int do_room_banner, /* 0=no, 1=yes,
- * 2 = I'm going to embed my own, so don't open the
- *
either.
- */
-
+ int do_room_banner, /* 1 = include the room banner and */
int unset_cookies, /* 1 = session is terminating, so unset the cookies */
int suppress_check, /* 1 = suppress check for instant messages */
int cache /* 1 = allow browser to cache this page */
@@ -151,7 +141,13 @@ void output_headers( int do_httpheaders, /* 1 = output HTTP headers */
wcsession *WCC = WC;
char httpnow[128];
- hprintf("HTTP/1.1 200 OK\n");
+ if (WCC->isFailure)
+ hprintf("HTTP/2.2 500 Internal Server Error");
+ else if (WCC->Hdr->HaveRange > 1)
+ hprintf("HTTP/1.1 206 Partial Content\r\n");
+ else
+ hprintf("HTTP/1.1 200 OK\r\n");
+
http_datestring(httpnow, sizeof httpnow, time(NULL));
if (do_httpheaders) {
@@ -194,40 +190,24 @@ void output_headers( int do_httpheaders, /* 1 = output HTTP headers */
if (do_htmlhead) {
begin_burst();
do_template("head");
-
- /* check for ImportantMessages (these display in a div overlaying the main screen) */
- if (StrLength(WCC->ImportantMsg) > 0) {
- wc_printf("