Re: cvs: php4 /ext/standard head.c
| From: | Rasmus Lerdorf | Date: | Fri, 17 May 2002 16:05:52 +0000 |
| Subject: | Re: cvs: php4 /ext/standard head.c | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-84145@lists.php.net to get a copy of this message | ||
> Modified files:
> /php4/ext/standard head.c
> Log:
> Only the last cookie was getting set. (You can have
> more than one Set-Cookie: header, as indicated by
> http://wp.netscape.com/newsref/std/cookie_spec.html.)
>
> - return sapi_add_header(cookie, strlen(cookie), 0);
> + return sapi_add_header_ex(cookie, strlen(cookie), 0, 0 TSRMLS_CC);
Yikes, what a suspicious looking patch! This has been wrong all along for
all SAPI modules, but works, at least for the Apache 1.x case because
instead of checking the replace flag we check directly for Set-Cookie and
do an add instead of a replace in that case. As long as other SAPI
modules ignored this incorrectly set replace flag they should be ok with
this change. My fear is that we may have some that implemented this flag
with the reverse meaning. So heads-up sapi module maintainers, check your
code!
-Rasmus