From: Andrew Dolgov Date: Wed, 12 Aug 2015 18:51:02 +0000 (+0300) Subject: fetch_file_contents: use http/1.1 when not using curl X-Git-Tag: 16.3~138 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=45913edda0db376991876ab21eba0091f5de1a6c;p=tt-rss.git fetch_file_contents: use http/1.1 when not using curl --- diff --git a/include/functions.php b/include/functions.php index 6d183aba..d68f6bf1 100644 --- a/include/functions.php +++ b/include/functions.php @@ -445,14 +445,19 @@ } if (!$post_query && $timestamp) { - $context = stream_context_create(array( - 'http' => array( - 'method' => 'GET', - 'header' => "If-Modified-Since: ".gmdate("D, d M Y H:i:s \\G\\M\\T\r\n", $timestamp) - ))); + $context = stream_context_create(array( + 'http' => array( + 'method' => 'GET', + 'protocol_version'=> 1.1, + 'header' => "If-Modified-Since: ".gmdate("D, d M Y H:i:s \\G\\M\\T\r\n", $timestamp) + ))); } else { - $context = NULL; - } + $context = stream_context_create(array( + 'http' => array( + 'method' => 'GET', + 'protocol_version'=> 1.1 + ))); + } $old_error = error_get_last();