Bug #73297 [Opn->Csd]: HTTP stream wrapper should ignore HTTP 100 Continue

From: Date: Thu, 17 Nov 2016 11:38:05 +0000
Subject: Bug #73297 [Opn->Csd]: HTTP stream wrapper should ignore HTTP 100 Continue
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-205430@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73297&edit=1 ID: 73297 Updated by: jpauli@php.net Reported by: rowan dot collins at gmail dot com Summary: HTTP stream wrapper should ignore HTTP 100 Continue -Status: Open +Status: Closed Type: Bug Package: Streams related PHP Version: 5.6 -Assigned To: +Assigned To: jpauli Block user comment: N Private report: N New Comment: Thank you for your bug report. This issue has already been fixed in the latest released version of PHP, which you can download at http://www.php.net/downloads.php https://github.com/php/php-src/pull/2175 was merged Previous Comments: ------------------------------------------------------------------------ [2016-10-23 20:16:20] rowan dot collins at gmail dot com Pull request filed against 5.6: https://github.com/php/php-src/pull/2175 ------------------------------------------------------------------------ [2016-10-11 21:05:07] rowan dot collins at gmail dot com I've created a failing phpt test for this https://gist.github.com/IMSoP/b893785c9c8f04c2b5ce3b0a638b33a7 and intend to attempt a fix. ------------------------------------------------------------------------ [2016-10-11 21:02:03] rowan dot collins at gmail dot com Description: ------------ This bug report forms part of an attempt to test and fix the implementation of HTTP/1.1 in the HTTP stream wrapper. See http://marc.info/?l=php-internals&m=147544280019519&w=2 A "100 Continue" response is *usually* only sent in response to an "Expect: 100-continue" header, and *usually* only useful with requests which have a body (e.g. POST, PUT). As such, it is unlikely to be encountered by someone sending a GET request using e.g. file_get_contents, but this is not guaranteed. According to RFC 7231 section 6.2: > A client MUST be able to parse one or more 1xx responses received > prior to a final response, even if the client does not expect one. A > user agent MAY ignore unexpected 1xx responses. However, the code currently treats these statuses as errors: > HTTP request failed! HTTP/1.1 100 Continue ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73297&edit=1

« previous php.bugs (#205430) next »