Check-in [68a202e101]
Not logged in
Overview

SHA1 Hash:68a202e101e733749ce0e6c345e79da455aef96b
Date: 2007-11-21 12:21:03
User: drh
Comment:Attach login cookies to the root path of the server, so that multiple servers can coexist on the same site.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified src/cgi.c from [fb85a3385b] to [470b9d6c4c].

@@ -150,11 +150,11 @@
   const char *zName,    /* Name of the cookie */
   const char *zValue,   /* Value of the cookie.  Automatically escaped */
   const char *zPath,    /* Path cookie applies to.  NULL means "/" */
   int lifetime          /* Expiration of the cookie in seconds from now */
 ){
-  if( zPath==0 ) zPath = "/";
+  if( zPath==0 ) zPath = g.zTop;
   if( lifetime>0 ){
     lifetime += (int)time(0);
     blob_appendf(&extraHeader,
        "Set-Cookie: %s=%t; Path=%s; expires=%s; Version=1\r\n",
         zName, zValue, zPath, cgi_rfc822_datestamp(lifetime));

Modified src/style.c from [f64336963a] to [c9b574b264].

@@ -69,11 +69,11 @@
 /*
 ** Draw the header.
 */
 void style_header(const char *zTitle){
   const char *zLogInOut = "Login";
-  const char *zHeader = db_get("header", zDefaultHeader);
+  const char *zHeader = db_get("header", (char*)zDefaultHeader);
   struct Subscript *p;
   login_check_credentials();
 
   /* Generate the header up through the main menu */
   p = SbS_Create();