diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-12-17 10:12:53 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-12-17 10:12:53 +0100 |
commit | e4c60d70b010c6f860213a33580a7819e83e2f92 (patch) | |
tree | 4835e990bc2a72a4e8cd6dcd3b83f96dcfcb94ec | |
parent | b0e5f5973af00cc8b228ec5054b3637c3455d5da (diff) | |
parent | 04a45a407ead8e7afcdd3423b773074207e885df (diff) | |
download | volse-hubzilla-e4c60d70b010c6f860213a33580a7819e83e2f92.tar.gz volse-hubzilla-e4c60d70b010c6f860213a33580a7819e83e2f92.tar.bz2 volse-hubzilla-e4c60d70b010c6f860213a33580a7819e83e2f92.zip |
Merge remote-tracking branch 'mike/master' into dev
-rw-r--r-- | include/network.php | 15 |
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')) |