[php-src] Issue #10129: built-in webserver hangs on long URL
| From: | gggeek | Date: | Mon, 19 Dec 2022 14:23:02 +0000 |
| Subject: | [php-src] Issue #10129: built-in webserver hangs on long URL | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-243186@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/10129
Author: gggeek
### Description
When running the php builtin webserver using f.e.
php -S 192.168.56.15:8081, then
requesting a script using a longish url, such as http://192.168.56.15:8081/jsonrpc/debugger/action.php?protocol=0&host=192.168.56.15&port=8081&path=jsonrpc%2Fdemo%2Fserver%2Fserver.php&action=list&methodsig=0&id=&wstype=1&debug=0&timeout=&username=&password=&proxy=&proxyuser=&proxypwd=&requestcompression=0&responsecompression=0&clientcookies=`,
the webserver hangs.
Not only it does not respond with a 404 or any other response, but the only way to stop it is to
send a kill signal, as it will ignore CTRL-C on the command line.
The behaviour is reproducible with Firefox, Chrome and Curl as http clients.
I know that it is not recommended to use such long URLs, but 1. this is a test setup, not urls which
would be used on production sites; 2. in the php manual there is no info at all, not even in the
comments, about the maximum supported url length; 3. I could switch dynamically on the client side
between using GET and POST for such a request, but I am loath to do it by default - if the php
webserver's maximum url length is much shorter than what is supported by Apache and Nginx, it
would be nice to be able to tell them apart by looking f.e. at a custom http header set in
responses.
I can add packet captures if needed.
### PHP Version
PHP 8.1.2
### Operating System
Ubuntu 20.04