Header Call Closes Apache Headers but not PHP's

From: Date: Tue, 16 Nov 1999 02:19:03 +0000
Subject: Header Call Closes Apache Headers but not PHP's
Groups: php.dev 
Request: Send a blank email to php-dev+get-12589@lists.php.net to get a copy of this message
This should never happen in the real world, but we got a typo in a header() call and spent a good deal of time figuring out the problem. Here's the bad call: <?php header("Location: /\n"); ?> Our fingers happily typed the \n before the ". What ended up happening was that Apache saw that there was a newline delivered and faithfully closed the headers. PHP did not see that a newline had been delivered, so was not reporting that headers had been closed when we were subsequently trying to deliver more headers. Just made it awfully hard to debug. If any of the smart people folks who code for this project want to add yet another funky condition to the string scanning code that watches for header closures, this would be a very good thing for the rest of us. --jim

« previous php.dev (#12589) next »