aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-12-16 14:38:58 -0800
committerzotlabs <mike@macgirvin.com>2018-12-16 14:38:58 -0800
commit04a45a407ead8e7afcdd3423b773074207e885df (patch)
tree395235971ec7c5244a3fa17f12164ae01e5b6f5e /include
parentfc782060496ee5ca99ffe522b10e6463f4d08cc7 (diff)
downloadvolse-hubzilla-04a45a407ead8e7afcdd3423b773074207e885df.tar.gz
volse-hubzilla-04a45a407ead8e7afcdd3423b773074207e885df.tar.bz2
volse-hubzilla-04a45a407ead8e7afcdd3423b773074207e885df.zip
default curl to http/1.1
Diffstat (limited to 'include')
-rw-r--r--include/network.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/network.php b/include/network.php
index cd352e7db..df59a30e6 100644
--- a/include/network.php
+++ b/include/network.php
@@ -120,6 +120,14 @@ function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) {
@curl_setopt($ch, CURLOPT_USERPWD, $opts['http_auth']);
}
+ if(array_key_exists('http_version',$opts)) {
+ @curl_setopt($ch,CURLOPT_HTTP_VERSION,$opts['http_version']);
+ }
+ else {
+ @curl_setopt($ch,CURLOPT_HTTP_VERSION,CURL_HTTP_VERSION_1_1);
+ }
+
+
if(x($opts,'cookiejar'))
@curl_setopt($ch, CURLOPT_COOKIEJAR, $opts['cookiejar']);
if(x($opts,'cookiefile'))
@@ -290,6 +298,13 @@ function z_post_url($url, $params, $redirects = 0, $opts = array()) {
@curl_setopt($ch, CURLOPT_USERPWD, $opts['http_auth']);
}
+ if(array_key_exists('http_version',$opts)) {
+ @curl_setopt($ch,CURLOPT_HTTP_VERSION,$opts['http_version']);
+ }
+ else {
+ @curl_setopt($ch,CURLOPT_HTTP_VERSION,CURL_HTTP_VERSION_1_1);
+ }
+
if(x($opts,'cookiejar'))
@curl_setopt($ch, CURLOPT_COOKIEJAR, $opts['cookiejar']);
if(x($opts,'cookiefile'))