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
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php