Skip to content

Commit

Permalink
Restrict CURLOPT_PROTOCOLS
Browse files Browse the repository at this point in the history
  • Loading branch information
ozh committed Dec 30, 2013
1 parent 14b5f32 commit 6856025
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion library/Requests/Transport/cURL.php
Expand Up @@ -68,9 +68,12 @@ public function __construct() {
if (version_compare($this->version, '7.10.5', '>=')) {
curl_setopt($this->fp, CURLOPT_ENCODING, '');
}
if (version_compare($this->version, '7.19.4', '>=')) {
if (defined('CURLOPT_PROTOCOLS')) {
curl_setopt($this->fp, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
}
if (defined('CURLOPT_REDIR_PROTOCOLS')) {
curl_setopt($this->fp, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
}
}

/**
Expand Down

0 comments on commit 6856025

Please sign in to comment.