CHUNKED REQUESTS!

This commit is contained in:
Kenneth Reitz
2013-01-10 01:58:29 -05:00
parent 4a5b5bc86e
commit ef8563ab36
4 changed files with 121 additions and 37 deletions
+7
View File
@@ -40,6 +40,13 @@ def dict_to_sequence(d):
return d
def super_len(o):
if hasattr(o, '__len__'):
return len(o)
if hasattr(o, 'len'):
return o.len
if hasattr(o, 'fileno'):
return os.fstat(o.fileno()).st_size
def get_netrc_auth(url):
"""Returns the Requests tuple auth for a given url from netrc."""