httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Shea <s...@gtsdesign.com>
Subject [PATCH] mod_usertrack vs. Set-Cookie headers
Date Thu, 09 Mar 2000 08:16:05 GMT

Hey,

As best I can tell, any Set-Cookie headers already added to the
request_rec.headers_out table will be removed when mod_usertrack
adds its Set-Cookie header. This appears to be because mod_usertrack
uses ap_table_setn() with 'Set-Cookie' as the key, which forces the
table to have exactly one Set-Cookie header, the new one.

Shouldn't mod_usertrack be using ap_table_add() so that it's possible
to have more than one Set-Cookie header?

Regards,

	Gary Shea

p.s. This probably would never have come up if I knew the 'right'
handler to sneak my cookie-adding code into; knowing no better,
I used fixup.


A (trivial, naive, and untested) patch against 1.3.12:

--- mod_usertrack.c.orig        Thu Mar  9 01:10:16 2000
+++ mod_usertrack.c     Thu Mar  9 01:10:49 2000
@@ -213,7 +213,7 @@
                                 dcfg->cookie_name, cookiebuf);
     }

-    ap_table_setn(r->headers_out, "Set-Cookie", new_cookie);
+    ap_table_add(r->headers_out, "Set-Cookie", new_cookie);
     ap_table_setn(r->notes, "cookie", ap_pstrdup(r->pool, cookiebuf));   /* log first
time */
     return;
 }


Mime
View raw message