mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Redirect chain flag default off.
This commit is contained in:
+4
-1
@@ -32,7 +32,7 @@ class Request(object):
|
||||
|
||||
def __init__(self, url=None, headers=dict(), files=None, method=None,
|
||||
data=dict(), auth=None, cookiejar=None, timeout=None,
|
||||
redirect=True, allow_redirects=False):
|
||||
redirect=False, allow_redirects=False):
|
||||
|
||||
socket.setdefaulttimeout(timeout)
|
||||
|
||||
@@ -135,6 +135,7 @@ class Request(object):
|
||||
|
||||
return opener.open
|
||||
|
||||
|
||||
def _build_response(self, resp):
|
||||
"""Build internal :class:`Response <models.Response>` object from given response."""
|
||||
|
||||
@@ -155,6 +156,8 @@ class Request(object):
|
||||
except zlib.error:
|
||||
pass
|
||||
|
||||
# TODO: Support deflate
|
||||
|
||||
response.url = getattr(resp, 'url', None)
|
||||
|
||||
return response
|
||||
|
||||
Reference in New Issue
Block a user