Bug #76204 [Ana->Asn]: Remove the partial support for the CONNECT method
| From: | selim61@php.net | Date: | Thu, 13 Jun 2019 10:12:00 +0000 |
| Subject: | Bug #76204 [Ana->Asn]: Remove the partial support for the CONNECT method | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-221278@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76204&edit=1
ID: 76204
Updated by: selim61@php.net
Reported by: sid dot pasquale at gmail dot com
Summary: Remove the partial support for the CONNECT method
-Status: Analyzed
+Status: Assigned
Type: Bug
Package: Built-in web server
Operating System: linux
PHP Version: 7.0.29
-Assigned To:
+Assigned To: selim61
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2018-04-18 18:27:32] cmb@php.net
FTR: <https://github.com/php/php-src/pull/3220>
------------------------------------------------------------------------
[2018-04-10 16:31:39] requinix@php.net
Why...
Yes, it's in there, but it's not actually supported. My guess is that the person who
included CONNECT thought it was like every other verb. It isn't.
A proper implementation of tunneling is beyond the scope of the built-in server. The partial support
in there should be removed.
------------------------------------------------------------------------
[2018-04-10 16:26:02] sid dot pasquale at gmail dot com
"CONNECT" was defined on line 85 of "php_http_parser.c": https://github.com/php/php-src/blob/PHP-7.0.13/sapi/cli/php_http_parser.c#L85
------------------------------------------------------------------------
[2018-04-10 16:14:41] sid dot pasquale at gmail dot com
So the expected result should be "501 Not Implemented".
Furthermore "CONNECT" (like PATCH) seems to be implemented:
https://github.com/php/php-src/search?utf8=%E2%9C%93&q=PHP_HTTP_CONNECT&type=
Working "PATCH" example:
sid@zen:~$ echo -en "PATCH / HTTP/1.1\r\n\r\n" | nc localhost 8080 | head -n 1
HTTP/1.1 404 Not Found
------------------------------------------------------------------------
[2018-04-10 16:05:05] requinix@php.net
CONNECT is not supported because the built-in server is a simple server for simple development uses.
See request #72619.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=76204
--
Edit this bug report at https://bugs.php.net/bug.php?id=76204&edit=1