X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fwebcit.c;h=fd6398f59256fe79ea35cce90edc1b3388c1afb7;hb=b1f320eba210f7f1019e86ae88f7dd3d0ed1557c;hp=17177b559b103b2dd418393e5ee3e675d80d582a;hpb=7efbda7122290fb0bca37dad88145d7ed9ef5333;p=citadel.git diff --git a/webcit/webcit.c b/webcit/webcit.c index 17177b559..fd6398f59 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -367,6 +367,7 @@ void output_headers(int controlcode) suppress_check = ((controlcode & 0x08) >> 3); cache = ((controlcode & 0x10) >> 4); + wprintf("HTTP/1.0 200 OK\n"); httpdate(httpnow, time(NULL)); @@ -397,10 +398,15 @@ void output_headers(int controlcode) if (print_standard_html_head > 0) { wprintf("\n"); - if (refresh30) svprintf("REFRESHTAG", WCS_STRING, - "\n"); - else svprintf("REFRESHTAG", WCS_STRING, - "\n"); + if (refresh30) { + svprintf("REFRESHTAG", WCS_STRING, "%s", + "\n"); + } + else { + svprintf("REFRESHTAG", WCS_STRING, "%s", + "\n"); + } + /* script for checking for pages (not always launched) */ sprintf(onload_fcn, "function onload_fcn() { \n"); @@ -432,15 +438,12 @@ void output_headers(int controlcode) ); /* end script */ - do_template("head"); - clear_local_substs(); svprintf("extrabodyparms", WCS_STRING, "%s", "onload='onload_fcn();' "); do_template("background"); - clear_local_substs(); } if (print_standard_html_head == 1) { @@ -862,6 +865,7 @@ void session_loop(struct httprequest *req) WC->upload_length = 0; WC->upload = NULL; + WC->vars = NULL; WC->is_wap = 0; @@ -877,7 +881,7 @@ void session_loop(struct httprequest *req) hptr = hptr->next; if (!strncasecmp(buf, "Cookie: webcit=", 15)) { - strcpy(cookie, &buf[15]); + safestrncpy(cookie, &buf[15], sizeof cookie); cookie_to_stuff(cookie, NULL, c_username, c_password, c_roomname); }