Skip to content

Commit

Permalink
Only force cURL protocols if we actually can
Browse files Browse the repository at this point in the history
This doesn't have any security ramifications, as it's only a double-check on top
of our existing checking. Fixes #69
  • Loading branch information
rmccue committed Oct 6, 2013
1 parent 4e2ceb6 commit 022400b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion library/Requests/Transport/cURL.php
Expand Up @@ -68,7 +68,9 @@ public function __construct() {
if (version_compare($this->version, '7.10.5', '>=')) {
curl_setopt($this->fp, CURLOPT_ENCODING, '');
}
curl_setopt($this->fp, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
if (version_compare($this->version, '7.19.4', '>=')) {
curl_setopt($this->fp, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
}
}

/**
Expand Down

0 comments on commit 022400b

Please sign in to comment.