Fixed wrong cookies which caused problems with Chrome

SVN revision: 2137
This commit is contained in:
2008-11-03 13:04:05 +00:00
parent 4517ec81b7
commit 21a67ec16e
+5 -14
View File
@@ -7151,22 +7151,9 @@ void show_http_header(LOGBOOK * lbs, BOOL expires, char *cookie)
else
rsprintf("Content-Type: text/html;charset=%s\r\n", DEFAULT_HTTP_CHARSET);
if (cookie && cookie[0]) {
if (cookie && cookie[0])
set_cookie(lbs, cookie, NULL, FALSE, "99999"); /* ten years by default */
if (getcfg(lbs->name, "URL", str, sizeof(str))) {
extract_path(str);
url_encode(str, sizeof(str));
if (str[0])
rsprintf(" path=/%s/%s;", str, lbs->name_enc);
else
rsprintf(" path=/%s;", lbs->name_enc);
} else
rsprintf(" path=/%s;", lbs->name_enc);
rsprintf("\r\n");
}
if (use_keepalive) {
rsprintf("Connection: Keep-Alive\r\n");
rsprintf("Keep-Alive: timeout=60, max=10\r\n");
@@ -27465,6 +27452,10 @@ void server_loop(void)
if (image_magick_exist)
eprintf("ImageMagick detected\n");
/* check for keepalive */
if (!use_keepalive)
eprintf("Keep-alive disabled\n");
/* build logbook indices */
if (!verbose && !running_as_daemon)
eprintf("Indexing logbooks ... ");