summaryrefslogtreecommitdiff
path: root/requests/utils.py
Commit message (Collapse)AuthorAgeFilesLines
* Push code review advice from @sigmavirus24Cory Benfield2015-12-191-4/+5
|
* Handle bytes and unicode URLs for netlocCory Benfield2015-12-181-1/+4
|
* Fix super_len for partially read filesIan Cordasco2015-11-101-9/+15
| | | | Closes #2872
* Emit warnings when using text mode files.Cory Benfield2015-10-241-2/+17
|
* Merge pull request #2803 from asieira/masterIan Cordasco2015-10-051-27/+1
|\ | | | | Update default user-agent (#2785)
| * Update default user-agent (#2785)Alexandre Sieira2015-10-051-27/+1
| | | | | | | | | | | | * Updated default user agent so that it includes only the requests version; * Added PyCharm / IDEA project directory to `.gitignore`.
* | Merge pull request #2721 from Lukasa/no_proxy_fixCory Benfield2015-10-051-1/+3
|\ \ | |/ |/| Ignore empty fields in no_proxy env var
| * Ignore empty fields in no_proxyCory Benfield2015-08-131-1/+3
| |
* | don't lowercase a url before urlparsing itJason Grout2015-08-281-1/+1
| | | | | | | | urlparse automatically lowercases the scheme and hostname
* | Fix documentation for the proxies dictionaryJason Grout2015-08-271-1/+5
| |
* | Factor out the proxy selection codeJason Grout2015-08-271-0/+8
|/
* Change ignore_errors to raise_errors in get_netrc_authDavid Pursehouse2015-06-291-3/+3
| | | | Change-Id: Ib82c7c614edafc15e5db858d9c1b9a73aebd8a95
* Allow get_netrc_auth to raise parse/permission errors to callerDavid Pursehouse2015-06-291-2/+3
| | | | | | | | | | | | | If the netrc file exists but cannot be parsed or read, get_netrc_auth silently fails. Add a new argument `ignore_errors` which when set to False will cause any parse/permission errors to be raised to the caller. The default value is True, which means the default behavior is unchanged. Fixes #2654 Change-Id: I7436aaaf593178673ab84fd9e7ab4bcb0e3fe75e
* Merge pull request #2393 from sigmavirus24/bug/2356Kenneth Reitz2015-01-271-4/+12
|\ | | | | Attempt to quote anyway if unquoting fails
| * Attempt to quote anyway if unquoting failsIan Cordasco2015-01-181-4/+12
| | | | | | | | Fixes #2356
* | Check that a filename is a basestring instanceIan Cordasco2015-01-201-2/+4
|/ | | | | | | | | Instead of only checking one or another type of string-like object that we accept, let's be able to check both. Previously, we only checked if the filename was an instance of the native str type which on Python 2 excluded unicode filenames and bytes-like filenames on Python 3. Fixes #2411
* utils.guess_filename fails if the given parameter looks like a file object ↵Arthur Darcet2014-12-121-1/+1
| | | | | | but has a non-string name attribute e.g. a cherrypy uploaded file behave like a regular file, except that its name attribute is an int and passing it directly to requests fails because of that
* Add DeprecationWarnings to inform users of plansIan Cordasco2014-10-261-0/+11
| | | | | | | | After a long discussion in IRC and on several issues, the developers of requests have decided to remove specific functions from requests.utils in version 3.0.0. To give users ample time to prepare for this, we've added DeprecationWarnings long in advance. See also the planning of this in issue #2266.
* Made more betterMichael DeLay2014-10-101-1/+1
|
* Fixed #2250mikecool10002014-10-091-1/+1
|
* Update utils.pymikecool10002014-10-081-1/+1
| | | Fixed -2250
* Merge pull request #2249 from t-8ch/fix_2247Kenneth Reitz2014-10-051-0/+15
|\ | | | | fix #2247
| * fix #2247Thomas Weißschuh2014-09-251-0/+15
| | | | | | | | | | | | We have to pass urllib3 the url without the authentication information, else it will be parsed by httplib as a netloc and included in the request line and Host header
* | fix documentation for utils.get_unicode_from_response() :)Kenneth Reitz2014-10-051-4/+1
|/
* add trailing commaKevin Burke2014-08-291-1/+1
|
* keep-aliveKenneth Reitz2014-08-281-1/+2
|
* Merge pull request #1924 from schlamar/proxy-default-schemeKenneth Reitz2014-05-121-8/+13
|\ | | | | Default proxy scheme to HTTP
| * Revert "Proxy urls should have explicit schemes."schlamar2014-02-181-8/+13
| | | | | | | | | | | | | | | | This reverts commit 840540b6b1f07ef87faab73392c03fbef0dcc9fe. Conflicts: requests/adapters.py requests/utils.py
* | Fix typoPavlo Kapyshin2014-04-101-1/+1
| |
* | Merge pull request #1951 from Lukasa/proxyauthKenneth Reitz2014-03-231-10/+15
|\ \ | | | | | | Re-evaluate proxy authorization.
| * | Split get_environ_proxies into two methods.Cory Benfield2014-03-121-10/+15
| |/ | | | | | | This makes it possible to get at the no_proxy logic separately.
* | Removed compress from accepted encodings.schlamar2014-03-121-1/+1
|/
* Be less defensive in get_auth_from_url.Cory Benfield2014-01-121-7/+4
|
* Meet @sigmavirus24's demanding stylistic criteria.Cory Benfield2014-01-121-3/+5
|
* TypeError, not AttributeError on 3.3.Cory Benfield2014-01-111-1/+1
|
* Unquote the auth after splitting the url.Cory Benfield2014-01-111-4/+7
|
* Merge pull request #1846 from acdha/paranoid-get_netrc_authKenneth Reitz2014-01-081-4/+13
|\ | | | | get_netrc_auth should handle os.path.expanduser failing
| * get_netrc_auth: code cleanupChris Adams2014-01-071-2/+3
| | | | | | | | | | * Stop iterating as soon as we find a netrc file * More obvious return None
| * get_netrc_auth: handle os.path.expanduser failureChris Adams2014-01-071-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | os.path.expanduser can raise a KeyError when $HOME is not set and the POSIX getpwuid() call fails, which can happen when running under a UID which is not in /etc/passwd or when the password file cannot be read. The upstream bug report http://bugs.python.org/issue20164 is unlikely to be backported to Python 2.x even if fixed so this change handles KeyError by skipping netrc authentication. Closes #1846
* | Don't let proxy_bypass bring you down.Cory Benfield2014-01-071-1/+10
|/
* Merge pull request #1770 from kmadac/masterKenneth Reitz2013-12-051-5/+64
|\ | | | | Implemetation of IP address ranges for no_proxy environment variable
| * function is_ipv4_network renamedKamil Madac2013-12-051-4/+12
| | | | | | | | more detailed check of cidr format
| * Typo fixedKamil Madac2013-12-051-1/+1
| |
| * Broad exception fixedKamil Madac2013-12-051-2/+2
| |
| * Tiny comment fixKamil Madac2013-12-041-1/+1
| |
| * Better commentsKamil Madac2013-12-041-2/+11
| |
| * Redesigned no_proxy ip range imlementation to use only stdlib functionsKamil Madac2013-12-031-15/+40
| |
| * Added possibility to use IP ranges (ex. 192.168.1.0/24) to no_proxy ↵Kamil Madac2013-12-021-5/+22
| | | | | | | | environment variable
* | Remove the unicode literals.Cory Benfield2013-12-051-4/+4
| |
* | Made default_user_agent reusablekracekumar2013-12-051-4/+4
| | | | | | This is not exciting change, but will help for people who wants to change name of user agent alone. Also name can be unicode.