Commit 06c71eec authored by Zot's avatar Zot Committed by Mario

default curl to http/1.1


(cherry picked from commit 04a45a40)
parent aabc6c28
Pipeline #97130 passed with stage
in 5 minutes and 57 seconds
......@@ -116,6 +116,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'))
......@@ -286,6 +294,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'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment