httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: mod_usertrack.c bad cookie note (fwd)
Date Sun, 02 Feb 1997 03:41:57 GMT
On Sat, 1 Feb 1997, Rob Hartill wrote:
> 
> Not acked. Originally Cc'ed to Mark and Brian.
> 
> ---------- Forwarded message ----------
> Date: Sat, 01 Feb 1997 17:41:08 -0500
> From: Charles Thayer <thayer@mediabridge.com>
> To: apache-bugs@apache.org
> Cc: brian@hyperreal.com, mb-ops@astor.mediabridge.com, mark@ukweb.com
> Subject: mod_usertrack.c bad cookie note
> 
> Version: SunOS 4.1.3, apache_1.2b*
> Modules: mod_usertrack mod_log_config
> 
> Source code bug.  mod_log_config.c(660:apache_1.2b6)
> uses the new add_custom_log function with "%{Cookie}n",
> but mod_usertrack.c(169,192:apache_1.2b6) uses the
> table_set function with "cookie" in lower-case.  
> 
> The result of this is that the cookie log will always
> log the cookie as "-" instead of expanding the cookie
> to the noted value.
> 
> Either mod_log_config.c should use "%{cookie}n" or
> mod_usertrack.c should save the cookie information 
> under the name "Cookie" (upper-case).
> 
> /charles
> PS. Brian, the bug report form died on me and said to contact you.
>     http://apache.org/bug_report.html, http://www.apache.org/bugs.cgi
> PPS. The comment area at the top of mod_usertrack should be adjusted
>      as well  :-)

I'd say the way it's documented is how we want it to work... so...

Dean

Index: mod_usertrack.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_usertrack.c,v
retrieving revision 1.8
diff -c -3 -r1.8 mod_usertrack.c
*** mod_usertrack.c	1997/01/20 04:28:16	1.8
--- mod_usertrack.c	1997/02/02 03:37:17
***************
*** 166,172 ****
        ap_snprintf(new_cookie, 1024, "%s%s; path=/", COOKIE_NAME, cookiebuf);
  
      table_set(r->headers_out,"Set-Cookie",new_cookie);
!     table_set(r->notes, "cookie", cookiebuf); /* log first time */
      return;
  }
  
--- 166,172 ----
        ap_snprintf(new_cookie, 1024, "%s%s; path=/", COOKIE_NAME, cookiebuf);
  
      table_set(r->headers_out,"Set-Cookie",new_cookie);
!     table_set(r->notes, "Cookie", cookiebuf); /* log first time */
      return;
  }
  
***************
*** 189,195 ****
  	if (cookieend) *cookieend='\0';	/* Ignore anything after a ; */
  
  	/* Set the cookie in a note, for logging */
! 	table_set(r->notes, "cookie", cookiebuf);
  
  	return DECLINED;          /* Theres already a cookie, no new one */
        }
--- 189,195 ----
  	if (cookieend) *cookieend='\0';	/* Ignore anything after a ; */
  
  	/* Set the cookie in a note, for logging */
! 	table_set(r->notes, "Cookie", cookiebuf);
  
  	return DECLINED;          /* Theres already a cookie, no new one */
        }



Mime
View raw message