X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fwebcit.c;h=680003e2f56a988354663f91cbb7347d81896942;hb=68dcf6ef3bb2898b7317aed80569c872b867438b;hp=7531ac49e53f3fc6b7e1750e0b087e61d42ef05d;hpb=f66a0169fc5b836a733c8cf241807523a011aba0;p=citadel.git diff --git a/webcit/webcit.c b/webcit/webcit.c index 7531ac49e..680003e2f 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -135,7 +135,7 @@ void output_headers( int do_httpheaders, /* 1 = output HTTP headers PACKAGE_STRING); } - if (cache) { + if (cache > 0) { char httpTomorow[128]; http_datestring(httpTomorow, sizeof httpTomorow, @@ -156,20 +156,23 @@ void output_headers( int do_httpheaders, /* 1 = output HTTP headers ); } - stuff_to_cookie(cookie, 1024, - WCC->wc_session, - WCC->wc_username, - WCC->wc_password, - WCC->wc_roomname, - get_selected_language() - ); + if (cache < 2) { - if (unset_cookies) { - hprintf("Set-cookie: webcit=%s; path=/\r\n", unset); - } else { - hprintf("Set-cookie: webcit=%s; path=/\r\n", cookie); - if (server_cookie != NULL) { - hprintf("%s\n", server_cookie); + stuff_to_cookie(cookie, 1024, + WCC->wc_session, + WCC->wc_username, + WCC->wc_password, + WCC->wc_roomname, + get_selected_language() + ); + + if (unset_cookies) { + hprintf("Set-cookie: webcit=%s; path=/\r\n", unset); + } else { + hprintf("Set-cookie: webcit=%s; path=/\r\n", cookie); + if (server_cookie != NULL) { + hprintf("%s\n", server_cookie); + } } } @@ -254,7 +257,7 @@ void http_transmit_thing(const char *content_type, #ifndef TECH_PREVIEW lprintf(9, "http_transmit_thing(%s)%s\n", content_type, - (is_static ? " (static)" : "") + ((is_static > 0) ? " (static)" : "") ); #endif output_headers(0, 0, 0, 0, 0, is_static);