Re: problem with header() and php trunk

From: Date: Thu, 24 Feb 2011 22:56:47 +0000
Subject: Re: problem with header() and php trunk
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-51534@lists.php.net to get a copy of this message
On 24/02/11 10:41 PM, Ben Schmidt wrote:
On 25/02/11 3:28 AM, Carsten Wiedmann wrote:
this code is not working with the current trunk: | <?php | | header('Content-Language: '); | ?> The result is an internale server error: | [Thu Feb 24 17:21:25 2011] [error] [client ::1] malformed header | from script. Bad header=Content-Language: php-cgi.exe
I don't think this is a PHP problem. Everything in the error message indicates to me that PHP is doing what you told it to do, and the webserver doesn't like it (for whatever reason). This is either your fault, or the webserver's fault, and I don't see why PHP should compensate for it. Ben.
Oh, this only happens with trunk, but not with e.g 5.3.5. But just see the difference: test.php | <?php | header('Content-Language: '); | ?> That's what PHP 5.3.5 is sending to the server: | X-Powered-By: PHP/5.3.5 | Content-Language: | Content-type: text/html And that's what PHP trunk is sending to the server: | X-Powered-By: PHP/5.3.99-dev | Content-Language | Content-type: text/html see the missing ":" after the header name. if I'm using this script: test.php | <?php | header('Content-Language:'); | ?> the output is correct: | X-Powered-By: PHP/5.3.99-dev | Content-Language: | Content-type: text/html Regards, Carsten

« previous php.internals (#51534) next »