mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-30 08:50:55 +08:00
Add hotfix for python-openid
This commit is contained in:
@@ -93,7 +93,10 @@ def setDefaultFetcher(fetcher, wrap_exceptions=True):
|
||||
|
||||
def usingCurl():
|
||||
"""Whether the currently set HTTP fetcher is a Curl HTTP fetcher."""
|
||||
return isinstance(getDefaultFetcher(), CurlHTTPFetcher)
|
||||
fetcher = getDefaultFetcher()
|
||||
if isinstance(fetcher, ExceptionWrappingFetcher):
|
||||
fetcher = fetcher.fetcher
|
||||
return isinstance(fetcher, CurlHTTPFetcher)
|
||||
|
||||
class HTTPResponse(object):
|
||||
"""XXX document attributes"""
|
||||
@@ -250,7 +253,7 @@ class CurlHTTPFetcher(HTTPFetcher):
|
||||
|
||||
# Remove the status line from the beginning of the input
|
||||
unused_http_status_line = header_file.readline().lower ()
|
||||
while unused_http_status_line.startswith('http/1.1 100 '):
|
||||
while unused_http_status_line.startswith('http/1.1 1'):
|
||||
unused_http_status_line = header_file.readline()
|
||||
unused_http_status_line = header_file.readline()
|
||||
|
||||
@@ -319,7 +322,7 @@ class CurlHTTPFetcher(HTTPFetcher):
|
||||
return 0
|
||||
else:
|
||||
return data.write(chunk)
|
||||
|
||||
|
||||
response_header_data = cStringIO.StringIO()
|
||||
c.setopt(pycurl.WRITEFUNCTION, write_data)
|
||||
c.setopt(pycurl.HEADERFUNCTION, response_header_data.write)
|
||||
|
||||
Reference in New Issue
Block a user