From: Christoph M. Becker Date: Mon, 8 Mar 2021 13:39:38 +0000 (+0100) Subject: Merge branch 'PHP-7.4' into PHP-8.0 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3880b8785be8cec394e7290e0ef4307be0ae596e;p=php Merge branch 'PHP-7.4' into PHP-8.0 * PHP-7.4: Fix #80838: HTTP wrapper waits for HTTP 1 response after HTTP 101 --- 3880b8785be8cec394e7290e0ef4307be0ae596e diff --cc NEWS index c5d3f606ce,751b79be69..46bf8239aa --- a/NEWS +++ b/NEWS @@@ -26,12 -28,10 +26,14 @@@ PH . Fixed bug #80771 (phpinfo(INFO_CREDITS) displays nothing in CLI). (cmb) . Fixed bug #78719 (http wrapper silently ignores long Location headers). (cmb) + . Fixed bug #80838 (HTTP wrapper waits for HTTP 1 response after HTTP 101). + (manuelm) -04 Mar 2021, php 7.4.16 +- Zip: + . Fixed bug #80825 (ZipArchive::isCompressionMethodSupported does not exist). + (cmb) + +18 Feb 2021, PHP 8.0.3 - Core: . Fixed #80706 (mail(): Headers after Bcc headers may be ignored). (cmb) diff --cc ext/standard/tests/http/bug80838.phpt index 0000000000,2b81e042bb..66f3113e1a mode 000000,100644..100644 --- a/ext/standard/tests/http/bug80838.phpt +++ b/ext/standard/tests/http/bug80838.phpt @@@ -1,0 -1,41 +1,41 @@@ + --TEST-- + Bug #80838 (HTTP wrapper waits for HTTP 1 response after HTTP 101) + --INI-- + allow_url_fopen=1 + --SKIPIF-- - ++ + --FILE-- + $pid, 'uri' => $uri] = http_server($responses); + + $options = [ + 'http' => [ + 'ignore_errors' => true + ], + ]; + + $ctx = stream_context_create($options); + -$fd = fopen('http://127.0.0.1:12342/', 'rb', false, $ctx); ++$fd = fopen($uri, 'rb', false, $ctx); + fclose($fd); + var_dump($http_response_header); + + http_server_kill($pid); + + ?> + --EXPECT-- + array(3) { + [0]=> + string(32) "HTTP/1.1 101 Switching Protocols" + [1]=> + string(15) "Header1: Value1" + [2]=> + string(15) "Header2: Value2" + }