X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fwebcit.c;h=4108ecb38c3971355b6f5ad650ed7cbd02c9b133;hb=c73091a2ae896b6be5aa94b911c1c89d76a85688;hp=944b457c86ab0caf1a5dc2cf536bbc601a0ab605;hpb=dbebe0b18421f635c0cded24c7194be47b03bc9d;p=citadel.git
diff --git a/webcit/webcit.c b/webcit/webcit.c
index 944b457c8..4108ecb38 100644
--- a/webcit/webcit.c
+++ b/webcit/webcit.c
@@ -3,21 +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 as
- * published by the Free Software Foundation; either version 3 of the
- * License, or (at your option) any later version.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * modify it under the terms of the GNU General Public License, version 3.
*/
#define SHOW_ME_VAPPEND_PRINTF
@@ -32,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)
{
@@ -144,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 */
@@ -157,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) {
@@ -200,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("