]> git.wh0rd.org - tt-rss.git/commitdiff
fetch_file_contents: use http/1.1 when not using curl
authorAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Wed, 12 Aug 2015 18:51:02 +0000 (21:51 +0300)
committerAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Wed, 12 Aug 2015 18:51:02 +0000 (21:51 +0300)
include/functions.php

index 6d183abaa9420ea03684bc2c553ad692c2f6cdbf..d68f6bf106a6882a4a59c9de6da4c2d9441cd1cb 100644 (file)
                        }
 
                        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();