Commit Graph

1349 Commits

Author SHA1 Message Date
Kenneth Reitz 3bb13f8fbb v1.2.3 2013-05-25 12:48:10 -04:00
Kenneth Reitz 00ab8fbfea Merge remote-tracking branch 'origin/master' 2013-05-21 17:43:53 -04:00
Kenneth Reitz 9930c9c737 v1.2.2 2013-05-21 17:43:13 -04:00
Kenneth Reitz 2ee814d924 Merge pull request #1375 from t-8ch/fix_digest_auth
don't replace 'Digest' in digest header value
2013-05-21 14:33:25 -07:00
Thomas Weißschuh 3b0d8b8e39 don't replace 'Digest' in digest header value
See https://github.com/kennethreitz/requests/issues/1358
2013-05-21 17:48:30 +00:00
papaeye 715a57dec8 Fix typo, %t -> %r 2013-05-22 02:20:51 +09:00
Ib Lundgren 003c795afe Only pass unicode fieldnames to urllib3. 2013-05-21 09:46:28 +01:00
Chase Sterling 98114245c6 Refactor merge_kwargs for clarity and to fix a few bugs 2013-05-20 21:20:51 -04:00
Kenneth Reitz 8eb4243f12 Merge remote-tracking branch 'origin/master' 2013-05-20 16:10:43 -04:00
Kenneth Reitz 569b59f495 v1.2.1 2013-05-20 16:10:23 -04:00
Kenneth Reitz 8f42369aa9 Merge pull request #1356 from Zoramite/ConnectionPoolArgs
Adding an argument to the adapter for passing a block argument
2013-05-20 13:05:02 -07:00
Kenneth Reitz f4e7809e7c Merge pull request #1361 from Lukasa/1360
Always percent-encode location headers.
2013-05-20 13:04:08 -07:00
Ian Cordasco 9ce7f0bf5b Attempt a fix for @michaelhelmick 2013-05-20 10:58:03 -04:00
Dave Shawley 6e76ab7188 Fix for #1362.
`PreparedRequest.prepare_url` incorrectly applied IDNA encoding to the
URLs entire `netloc`.  It should only be encoding the hostname portion
of the URL.  IDNA encoding was limiting the user info, host, and port
segments to be a maximum of 63 characters which causes problems for
all by the most trivial user + password combinations.

- Replaced usage of `urlparse` in `PreparedRequest.prepare_url` with
  `urllib3` equivalent.
- Modified IDNA encoding section so that it only encodes the host
  portion of the URL.
2013-05-16 13:12:34 -04:00
Cory Benfield 2b6ebd2521 Always percent-encode location headers. 2013-05-16 12:02:46 +01:00
Łukasz Langa 4c8af1fff4 Fixes #1320: transport adapters stored in ordered form 2013-05-15 13:34:09 +02:00
Randy Merrill c03e14242b Adding the _pool_bloc to the list of attrs. 2013-05-11 18:30:31 -07:00
Randy Merrill 9cb3d6444d Fixing the call to init_poolmanagers to correctly unpickle the adapter. 2013-05-11 18:13:08 -07:00
Randy Merrill 053613688b Moving the order of the arguments in the init to not interfere with existing usage. 2013-05-11 18:04:43 -07:00
Randy Merrill 2eb682671d Adding an argument to the adapter for passing a block argument to the connection pool.
This allows for blocking when using threading to prevent the pool from creating more connections that the max-size allows.

Specifically was seeing the following errors without the block=True:

    WARNING:requests.packages.urllib3.connectionpool:HttpConnectionPool is full, discarding connection: www.example.com
2013-05-10 23:46:54 -07:00
Ian Cordasco 88fda94218 Prevent a KeyError when there's no link headers 2013-05-08 23:26:49 -04:00
Hugo Osvaldo Barrera 18857a0eed Issue #749: Add optional SNI support for python2.
SNI support will be enabled for python2 if ndg-httpsclient and pyopenssl are available.
2013-05-03 21:05:42 -03:00
Colin Dunklau f7596c75dc Rewrite CaseInsensitiveDict to work correctly/sanely
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
2013-04-30 14:52:27 -05:00
Bryce Boe 49ca72c802 Update urllib3 to 59de03e6163c6928dc01832ed6e48e9f6c34c795.
This update includes two fixes:

* https://github.com/shazow/urllib3/issues/149
* https://github.com/shazow/urllib3/issues/174
2013-04-27 14:33:39 -07:00
Chase Sterling 0c609b59ab Fix session CookieJars without breaking more stuff this time 2013-04-25 23:15:50 -04:00
Chase Sterling 9763a671da Fix crash when session.cookies was not a RequestsCookieJar 2013-04-25 22:34:51 -04:00
Iuri de Silvio 736e8cd735 Fix max_redirects docs issue #1301 2013-04-17 12:27:06 -07:00
Kenneth Reitz 6046fcffe8 Merge pull request #1279 from jemerick/unicode_multipart_post
Unicode strings in multipart post requests
2013-04-16 12:55:58 -07:00
Kenneth Reitz d13bf9f113 support for draft-tbray-http-legally-restricted-status-02
http://datatracker.ietf.org/doc/draft-tbray-http-legally-restricted-stat
us/?include_text=1
2013-04-15 22:47:20 -04:00
Kenneth Reitz a527ecfabd Merge pull request #1242 from oviboy/master
HTTP Digest Auth case insensitive replacement of "Digest "
2013-04-13 20:28:43 -07:00
Kenneth Reitz 967cfbe663 Merge pull request #1299 from schlamar/fix-decompression
Use streaming decompression feature of urllib3.
2013-04-13 20:27:46 -07:00
Kenneth Reitz 561366cab0 Merge pull request #1309 from toastdriven/better-max-retries
Changed HTTPAdapter to allow max retries to be specified when initializing.
2013-04-13 12:05:13 -07:00
Ian Cordasco c5d0a0931e Change the method when it isn't already GET/HEAD
For some reason it was only change the method when a POST was being made. This
is almost certainly my fault.

Fixes #1303
2013-04-13 12:31:22 -04:00
Daniel Lindsley 36dcce1a06 Changed HTTPAdapter to allow max retries to be specified when initializing. 2013-04-12 16:40:39 -07:00
schlamar 59f916ca4a Use streaming decompression feature of urllib3. 2013-04-10 08:08:33 +02:00
schlamar 6d6252aa9f Update urllib3 to 71f84f9. 2013-04-10 08:00:36 +02:00
Cory Benfield c73f653352 Add HTTPAdapter to API docs. 2013-04-09 19:54:47 +01:00
Ian Cordasco afcc883d7f Fix #1293 2013-04-06 11:26:52 -04:00
Chase Sterling 49a3664222 Don't set all session cookies on response.cookies 2013-04-04 23:30:52 -04:00
Chase Sterling d22ac00098 fix #1287: Make sure expired cookies get removed from session.cookies 2013-04-04 22:11:38 -04:00
Jason Emerick e7247ce3f6 model the encode_files data handling after encode_params 2013-04-02 14:22:49 -04:00
Ian Cordasco 1abd13700b Closes #1280
Correct the doc-string for Session#request that I copied without thinking
about.
2013-04-02 09:27:25 -04:00
Kenneth Reitz 54ed5ed469 Revert "Fix for the issue https://github.com/kennethreitz/requests/issues/1280"
This reverts commit ca0aea640d.
2013-04-02 08:13:46 -04:00
Kamil Szot ca0aea640d Fix for the issue https://github.com/kennethreitz/requests/issues/1280 2013-04-02 13:42:40 +02:00
Kenneth Reitz 9c18febf45 Merge pull request #1277 from pborreli/typos
Fixed typos
2013-04-01 21:36:39 -07:00
Jason Emerick f37b968475 use compat.str instead of compat.builtin_str 2013-04-01 18:14:52 -04:00
Pascal Borreli 037b38badb Fixed typos 2013-04-01 18:02:18 +00:00
Alex Gaynor 39acf1dbd2 is should not be used for comparing numbers 2013-03-31 23:20:46 -07:00
Kenneth Reitz 59b69d1fb8 Merge remote-tracking branch 'origin/master' 2013-03-31 08:28:57 +03:00
Kenneth Reitz d06908d655 v1.2.0 2013-03-31 08:28:22 +03:00