httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <do...@covalent.net>
Subject Requests using If-Modified-Since cause response Set-Cookie to be discarded (fwd)
Date Tue, 19 Jun 2001 21:12:50 GMT
the patch after the fwd fixed the problem for him, is it intentional to
leave Set-Cookie headers out of HTTP_NOT_MODIFIED responses in
ap_send_error_response() ?

---------- Forwarded message ----------
Date: Mon, 18 Jun 2001 22:34:53 -0400
From: Andrew Gilmartin <andrewgilmartin@dynamicdiagrams.com>
To: modperl@apache.org
Subject: Requests using If-Modified-Since cause response Set-Cookie to be
    discarded

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.

---
Andrew Gilmartin
Ingenta / Dynamic Diagrams
andrewgilmartin@dynamicdiagrams.com


--- src/main/http_protocol.c    2001/03/09 10:10:26     1.300
+++ src/main/http_protocol.c    2001/06/19 21:11:00
@@ -2637,6 +2637,7 @@
                     "Warning",
                     "WWW-Authenticate",
                     "Proxy-Authenticate",
+                    "Set-Cookie",
                     NULL);
 
         terminate_header(r->connection->client);



Mime
View raw message