On Mon, 18 Jun 2001, Andrew Gilmartin wrote:

> I have PerlAuthenHandler handler that sets a cookie on authentication
> success. The cookie records, in part, the time of the last access to
> the site. Therefore for each access the cookie is updated. When a new
> document is accessed or a CGI script is run the cookie is sent to the
> browser. However, if the browser is asking for a document it has
> cached it will send an If-Modified-Since header. The file delivery
> mechanism in Apache will do the right thing with If-Modified-Since
> information and only send the document if, in fact, it has changed.
> Unfortunately, if it has not changed the cookie I set in my handler is
> discarded (no matter if I use $r->header_out() or
> $r->err_header_out()).
> 
> How can I force Apache to send the Set-Cookie header even if the
> document being delivered has not changed? I suspect that I am not the
> first person to run into this problem. A search of the list was
> unsuccessful, unfortunately.

i've not tested, but it looks like Set-Cookie is left out on purpose
(maybe an http rfc compliance thing or just a bug), this patch might
help..

--- src/main/http_protocol.c~   Tue Apr 17 11:30:14 2001
+++ src/main/http_protocol.c    Tue Jun 19 09:46:29 2001
@@ -2637,6 +2637,7 @@
                     "Warning",
                     "WWW-Authenticate",
                     "Proxy-Authenticate",
+                    "Set-Cookie",
                     NULL);
 
         terminate_header(r->connection->client);


Reply via email to