summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2015-08-12 21:51:02 +0300
committerAndrew Dolgov <[email protected]>2015-08-12 21:51:02 +0300
commit45913edda0db376991876ab21eba0091f5de1a6c (patch)
treefefa130c8595acb63fb78b772767367a30fb43fb /include
parent9109e171ee57169c504f30e673c2990b2eb5ce4c (diff)
fetch_file_contents: use http/1.1 when not using curl
Diffstat (limited to 'include')
-rw-r--r--include/functions.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/include/functions.php b/include/functions.php
index 6d183abaa..d68f6bf10 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();