Skip to content

Commit

Permalink
curl_httpclient: Set curl PROTOCOLS and REDIR_PROTOCOLS to HTTP|HTTPS
Browse files Browse the repository at this point in the history
  • Loading branch information
stiletto committed Jul 19, 2016
1 parent 79ef301 commit a9493d2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tornado/curl_httpclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@ def _curl_create(self):
if curl_log.isEnabledFor(logging.DEBUG):
curl.setopt(pycurl.VERBOSE, 1)
curl.setopt(pycurl.DEBUGFUNCTION, self._curl_debug)
if hasattr(pycurl,'PROTOCOLS'): # PROTOCOLS first appeared in pycurl 7.19.5 (2014-07-12)
curl.setopt(pycurl.PROTOCOLS, pycurl.PROTO_HTTP|pycurl.PROTO_HTTPS)
curl.setopt(pycurl.REDIR_PROTOCOLS, pycurl.PROTO_HTTP|pycurl.PROTO_HTTPS)
return curl

def _curl_setup_request(self, curl, request, buffer, headers):
Expand Down

0 comments on commit a9493d2

Please sign in to comment.