diff options
author | phani00 <phani00@gmail.com> | 2018-12-17 15:18:24 +0000 |
---|---|---|
committer | phani00 <phani00@gmail.com> | 2018-12-17 15:18:24 +0000 |
commit | d80b8ff30fd1bbd6d02e685bdfac4c5bcded9fa8 (patch) | |
tree | 3cd13897a9db5aba8b56c570c0cf5771e6bb22b2 /include | |
parent | 70a766171117fd94c7e0ca228d3b879f7f307e5f (diff) | |
parent | d190b1995b0886b430beb5dac1a1e72582b9ad2b (diff) | |
download | volse-hubzilla-d80b8ff30fd1bbd6d02e685bdfac4c5bcded9fa8.tar.gz volse-hubzilla-d80b8ff30fd1bbd6d02e685bdfac4c5bcded9fa8.tar.bz2 volse-hubzilla-d80b8ff30fd1bbd6d02e685bdfac4c5bcded9fa8.zip |
Merge branch 'dev' into dark-fix-dev
Diffstat (limited to 'include')
-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')) |