Bug #65066 [NEW]: Cli server not responsive when responding with 422 http status code
| From: | mauroasprea+php at gmail dot com | Date: | Wed, 19 Jun 2013 15:52:38 +0000 |
| Subject: | Bug #65066 [NEW]: Cli server not responsive when responding with 422 http status code | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-179632@lists.php.net to get a copy of this message | ||
From: mauroasprea+php at gmail dot com
Operating system:
PHP version: 5.4.16
Package: CGI/CLI related
Bug Type: Bug
Bug description:Cli server not responsive when responding with 422 http status code
Description:
------------
If u save and run the test script sample below with the cli built in
server:
php -S localhos:8000 -t .
Then when browsing to the file, the page never responds back (timeouts)
I've taken a look at the php cli server sourced and it seems that there a
lot of
missing http status codes, see https://github.com/php/php-
src/blob/master/sapi/cli/php_cli_server.c#L207
So it seems that there's an endless loop here
https://github.com/php/php-src/blob/master/sapi/cli/php_cli_server.c#L345
Test script:
---------------
<?php
http_response_code(422);
echo 'Not being shown!';
Expected result:
----------------
The script should show the page with the text:
Not being shown!
And the http status code "422"
Actual result:
--------------
Fatal error: Maximum execution time of 30 seconds exceeded in Unknown on
line 0
Seems to be endless loop
--
Edit bug report at https://bugs.php.net/bug.php?id=65066&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65066&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65066&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65066&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=65066&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=65066&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65066&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=65066&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=65066&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=65066&r=support
Expected behavior: https://bugs.php.net/fix.php?id=65066&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=65066&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=65066&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=65066&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65066&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=65066&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=65066&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=65066&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65066&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65066&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=65066&r=mysqlcfg