#18688 [Opn->Csd]: header() not replacing existing header.
| From: | sander@php.net | Date: | Fri, 02 Aug 2002 11:43:13 +0000 |
| Subject: | #18688 [Opn->Csd]: header() not replacing existing header. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-15806@lists.php.net to get a copy of this message | ||
ID: 18688
Updated by: sander@php.net
Reported By: t_o_m_@yahoo.com
-Status: Open
+Status: Closed
Bug Type: IIS related
Operating System: Windows 2000 Server SP2
PHP Version: 4.2.2
New Comment:
This should be fixed, please try a snapshot from snaps.php.net and
reopen this report if that's not the case.
Previous Comments:
------------------------------------------------------------------------
[2002-08-01 12:06:39] t_o_m_@yahoo.com
The second argument of the header() command is a boolean that indicates
if a call to header() should replace a header of a similar name. Under
IIS you get multiple headers regardless, see the examples below, note
the number of Foo: headers in each:
Example Script (foo.php):
=========================
<?php
header('Foo: 123',true);
header('Foo: 456',true);
?>
Output from Apache/PHP:
=======================
tab@test% telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /~tab/foo.php HTTP/1.0
HTTP/1.1 200 OK
Date: Thu, 01 Aug 2002 15:57:02 GMT
Server: Apache/1.3.26 (Unix) PHP/4.2.2 mod_ssl/2.8.9 OpenSSL/0.9.6a
X-Powered-By: PHP/4.2.2
Foo: 456
Connection: close
Content-Type: text/html
Output from IIS:
================
tab@test% telnet tab 80
Trying 100.100.30.164...
Connected to tab.bwlaw.co.uk.
Escape character is '^]'.
GET /foo.php HTTP/1.0
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Thu, 01 Aug 2002 16:00:44 GMT
Content-type: text/html
X-Powered-By: PHP/4.2.2
Foo: 123
Foo: 456
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18688&edit=1