#18688 [NEW]: header() not replacing existing header.

From: Date: Thu, 01 Aug 2002 16:06:40 +0000
Subject: #18688 [NEW]: header() not replacing existing header.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-15749@lists.php.net to get a copy of this message
From: t_o_m_@yahoo.com Operating system: Windows 2000 Server SP2 PHP version: 4.2.2 PHP Bug Type: IIS related Bug description: header() not replacing existing header. 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 bug report at http://bugs.php.net/?id=18688&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=18688&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=18688&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=18688&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=18688&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=18688&r=support Expected behavior: http://bugs.php.net/fix.php?id=18688&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=18688&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=18688&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=18688&r=globals

« previous php.bugs (#15749) next »