summaryrefslogtreecommitdiff
path: root/requests/utils.py
Commit message (Collapse)AuthorAgeFilesLines
* merge 2.0 insto masterKenneth Reitz2013-09-241-19/+38
|\
| * Allow spaces in the no_proxy environ variable.Cory Benfield2013-08-231-1/+1
| |
| * Better percent-escape exception.Cory Benfield2013-08-021-2/+6
| |
| * Merge branch 'proxyscheme' of git://github.com/Lukasa/requests into 2.0Kenneth Reitz2013-07-311-11/+7
| |\
| | * Proxy urls should have explicit schemes.Cory Benfield2013-07-281-15/+11
| | |
| * | Header keys should be native strings.Cory Benfield2013-07-291-6/+25
| |/ | | | | | | | | This commit follows a discussion on IRC. For more information, see the Pull Request associated with it.
* | Improved content encoding detection.Jon Parise2013-09-031-1/+5
|/ | | | | | | | | | | | get_encodings_from_content() can now detect HTML in-document content encoding declarations in the following formats: - HTML5 - HTML4 - XHTML 1.x served with text/html MIME type - XHTML 1.x served as XML Ref: http://www.w3.org/International/questions/qa-html-encoding-declarations
* @1434 Fix https://github.com/kennethreitz/requests/issues/1434Chen Huang2013-06-251-1/+1
|
* Use urllib to retrieve environment proxies.James Clarke2013-05-311-15/+13
| | | This has the added benefit of including proxies defined by the OS X System Configuration framework and in the Windows registry, rather than only checking os.environ.
* Refactor merge_kwargs for clarity and to fix a few bugsChase Sterling2013-05-201-2/+2
|
* Rewrite CaseInsensitiveDict to work correctly/sanelyColin Dunklau2013-04-301-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #649 and #1329 by making Session.headers a CaseInsensitiveDict, and fixing the implementation of CID. Credit for the brilliant idea to map `lowercased_key -> (cased_key, mapped_value)` goes to @gazpachoking, thanks a bunch. Changes from original implementation of CaseInsensitiveDict: 1. CID is rewritten as a subclass of `collections.MutableMapping`. 2. CID remembers the case of the last-set key, but `__setitem__` and `__delitem__` will handle keys without respect to case. 3. CID returns the key case as remembered for the `keys`, `items`, and `__iter__` methods. 4. Query operations (`__getitem__` and `__contains__`) are done in a case-insensitive manner: `cid['foo']` and `cid['FOO']` will return the same value. 5. The constructor as well as `update` and `__eq__` have undefined behavior when given multiple keys that have the same `lower()`. 6. The new method `lower_items` is like `iteritems`, but keys are all lowercased. 7. CID raises `KeyError` for `__getitem__` as normal dicts do. The old implementation returned 6. The `__repr__` now makes it obvious that it's not a normal dict. See PR #1333 for the discussions that lead up to this implementation
* Use streaming decompression feature of urllib3.schlamar2013-04-101-42/+0
|
* fix get_auth_from_urlKenneth Reitz2013-03-221-1/+1
|
* get_auth_from_url return None if nothing is foundKenneth Reitz2013-03-221-1/+1
|
* Make sure session cookies do not overwrite explicit request cookiesChase Sterling2013-02-161-2/+1
| | | | | Implement RequestsCookieJar.copy Use RequestsCookieJar.update when merging cookiejars
* Add Proxy-Auth header when proxies have credentials.Cory Benfield2013-02-061-0/+10
|
* shorten filename by os.path.basename in guess_filename(obj)Christopher Bare2013-01-301-1/+1
|
* it`s more pep8 nowoczkers2013-01-271-10/+10
|
* Remove support for certifiShivaram Lingamneni2013-01-171-2/+0
| | | | | | | As per #1105, certifi is being end-of-lifed. Requests will use either its own vendored bundle, or possibly (when packaged with OS distributions) an externally packaged bundle, which can be enabled by patching requests.certs.where().
* CHUNKED REQUESTS!Kenneth Reitz2013-01-101-0/+7
|
* Make sure proxies have their scheme attached.Cory Benfield2012-12-271-1/+15
|
* clean up code support for OS certificate bundlesShivaram Lingamneni2012-12-231-34/+2
|
* A bit of linting.Ian Cordasco2012-12-171-2/+1
| | | | Mostly removed a whole bunch of unused imports.
* tensionKenneth Reitz2012-12-171-52/+1
|
* further remove configKenneth Reitz2012-12-171-1/+8
|
* Merge pull request #945 from Lukasa/developKenneth Reitz2012-11-231-3/+21
|\ | | | | Respect the no_proxy environment variable.
| * Respect the no_proxy environment variable.Cory Benfield2012-11-181-3/+21
| | | | | | | | This change is in response to issue #879.
* | Merge pull request #947 from JohnPeacockMessageSystems/developKenneth Reitz2012-11-231-1/+3
|\ \ | | | | | | Only return a path if the cacert.pem file exists.
| * | Only return a path if the cacert.pem file exists.John Peacock2012-11-211-1/+3
| |/ | | | | | | | | | | This will permit the deletion of just that one file in order to fall back to the [probably more accurate but less consistent] Distro provided CA certs.
* | Back to issue #630, .isalnum() was sufficient in addressing the issue.Marcin Wielgoszewski2012-11-221-13/+10
|/ | | | Adding a try/except block just masks any issues that are raised here, issues that the developer should definitely be made aware of.
* Fix for user-agent settingPavel Dmitriev2012-11-131-1/+8
|
* Use a JSON-specific encoding detection when no encoding has been specified.Martijn Pieters2012-10-251-0/+35
| | | | | | JSON *must* be encoded using UTF-8, UTF-16 or UTF-32 (see the [RFC][1]; detect the encoding based on the fact that JSON always starts with 2 ASCII characters. [1]: http://tools.ietf.org/html/rfc4627#section-3
* quote_plus, unquote_plus addedLasse Vang Gravesen2012-10-221-1/+1
| | | | | | | | compat.py: relevant imports added utils.py: then those imports are imported here. Nothing else was changed, but I saw mentions of quoting later in utils.py but I wasnt sure what to do about that.
* Issue 901:mmartin2012-10-191-2/+3
| | | | Make value of Contents-Encoding header case insensitive per RFC 2616.
* Making the code more PEP8 compliantRadu Voicilas2012-10-091-1/+4
|
* Use __iter__ rather than the inefficient nested for loopsKunal Mehta2012-10-091-5/+2
|
* Fixes #817.Ian Cordasco2012-09-021-18/+39
| | | | | Use dicts and lists where necessary but accept both dicts and lists of 2-tuples everywhere.
* permissive implementation of iter_contentShivaram Lingamneni2012-09-021-0/+6
| | | | | | | This allows iter_content and iter_lines to succeed without crashing even after the response content has been fetched (iter_content gives you an iterator over the prefetched content)
* Added in a link handler as per issue #711Rhys Elsmore2012-08-211-0/+33
|
* Merge branch 'develop' into key_val_listsIan Cordasco2012-08-181-0/+3
|\ | | | | | | | | | | | | | | Conflicts: requests/models.py tests/test_requests.py Remove some of Lukasa's duplication of my efforts in _encode_data.
| * Whitespace fixes following PEP8.Locker5372012-08-161-0/+3
| |
* | Add to_key_val_lists to avoid repetition.Ian Cordasco2012-08-051-0/+27
|/ | | | | | | It uses the same logic whenever we're trying to use a list of key values and avoid what I had started doing -- using the same pattern everywhere. proxies, and headers should both be covered by this commit.
* Appengine workaroundSævar Öfjörð Magnússon2012-07-251-1/+1
|
* Move the user agent generation into it's own utility functionDonald Stufft2012-07-081-0/+31
|
* Merge pull request #629 from saschpe/developKenneth Reitz2012-06-281-0/+4
|\ | | | | Add openSUSE certificate support
| * Add openSUSE certificate supportSascha Peilicke2012-06-151-0/+4
| |
* | include certifiKenneth Reitz2012-06-281-2/+2
|/
* by @mwielgoszewskiKenneth Reitz2012-05-291-1/+1
|
* cleanup #633Kenneth Reitz2012-05-291-9/+4
|
* this try catch is a poor man's patch for issue #630 see ↵Tzury Bar Yochay2012-05-241-14/+21
| | | | https://github.com/kennethreitz/requests/issues/630