httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dale Ghent <da...@elemental.org>
Subject Multiple same response header wierdness
Date Fri, 28 Jun 2002 21:16:13 GMT

I'm seeing the following problem with 2.0.x but not with 1.3, but both are
using the same PHP version (4.2.1) with the same php.ini

I have a PHP application that, in response to a certain query, sets two
cookies (using the the PHP setcookie() function)

Under AP 1.3, both "Set-Cookie" headers are returned to the client, like
so:

AP 1.3:
------------------------------------------------------------------------
HTTP/1.1 302 Found
Date: Fri, 28 Jun 2002 19:30:09 GMT
Server: Apache/1.3.26 (Unix) PHP/4.2.1
X-Powered-By: PHP/4.2.1
Set-Cookie: phorum_admin_session=a942a32353b2312c9e5e578b67155ea3
Set-Cookie: phorum_auth=a942a32353b2312c9e5e578b67155ea3; expires=Sat,
28-Jun-03 19:30:10 GMT
Location: /forums/admin/index.php
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1
------------------------------------------------------------------------


However, under AP 2.0.x, the same behavior is not observed and is causing
havok by omitting the first cookie of the two that were set (so it's
returning only the last cookie set in the PHP app)

AP 2.0.x:
------------------------------------------------------------------------
HTTP/1.1 302 Found
Date: Fri, 28 Jun 2002 18:41:37 GMT
Server: Apache/2.0.40-dev (Unix) DAV/2 PHP/4.2.1
Accept-Ranges: bytes
X-Powered-By: PHP/4.2.1
Set-Cookie: phorum_auth=bddf70a669dbce7447669783be55adbf; expires=Sat,
28-Jun-03 18:41:38 GMT
Location: /forums/admin/index.php
Content-Length: 0
Content-Type: text/html; charset=iso-8859-1
------------------------------------------------------------------------

Now, before you say "oh, that must be a PHP sapi bug", I've checked that
code out, and it /looks/ like it should be doing the Right Thing. Also
note the difference in the type of headers returned under AP 1.3 and AP
2.0... and this was the result of the same exact request from the client.

Could this be a problem when the final contents of headers_out is merged
before data is sent back to the client?

/dale


Mime
View raw message