diff options
author | Rowan Tommins <git@rwec.co.uk> | 2020-06-11 19:05:00 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-08-03 16:30:09 +0200 |
commit | f9f769d4b9af367af864d35cf09dca5b08da2046 (patch) | |
tree | 67a8404011e152302460962f980c68e36e932f3f /UPGRADING | |
parent | 9b975fe98e88c3fd5c41fe6b209b715cf190887a (diff) | |
download | php-git-f9f769d4b9af367af864d35cf09dca5b08da2046.tar.gz |
Make http stream wrapper advertise HTTP/1.1 by default
In practice, we always act as an HTTP/1.1 client, for compatibility
with servers which ignore protocol version. Sending the version in
the request will avoid problems with servers which don't ignore it.
HTTP/1.0 can still be forced using a stream context option.
Closes GH-5899.
Diffstat (limited to 'UPGRADING')
-rw-r--r-- | UPGRADING | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -558,6 +558,14 @@ PHP 8.0 UPGRADE NOTES accept parameters by reference will now warn if a callback with reference parameters is used. Examples include array_filter() and array_reduce(). This was already the case for most, but not all, functions previously. + . The HTTP stream wrapper as used by functions like file_get_contents() + now advertises HTTP/1.1 rather than HTTP/1.0 by default. This does not + change the behaviour of the client, but may cause servers to respond + differently. To retain the old behaviour, set the 'protocol_version' + stream context option, e.g. + + $ctx = stream_context_create(['http' => ['protocol_version' => '1.0']]); + echo file_get_contents('http://example.org', false, $ctx); - Sysvmsg: . msg_get_queue() will now return an SysvMessageQueue object rather than a |