Commit Graph

1378 Commits

Author SHA1 Message Date
Audrius Butkevicius 9f119ee420 Update urllib3 to a43319f 2013-07-18 21:06:19 +00:00
Kenneth Reitz 65a0fd88a9 Merge pull request #1440 from fcurella/patch-0
unquote double-quotes cookie values
2013-07-15 06:54:00 -07:00
Kenneth Reitz 4b7cf389e4 Merge pull request #1439 from voberoi/master
Make sure netrc doesn't override any authentication settings explicitly set by the client
2013-07-15 06:22:53 -07:00
Kenneth Reitz 86d466c745 Merge pull request #1441 from Lukasa/1395
Remove urllib3-specific kwargs from non-urllib3 branch.
2013-07-15 06:22:41 -07:00
Philippe Ndiaye 18a736fbe6 Set 208 status_code to "already_reported" 2013-07-13 11:08:01 +02:00
Philippe Ndiaye 7bdf37bc27 Changed the "im_used" informational status code for the value given by IANA (226)
See RFC 3229 at http://tools.ietf.org/html/rfc3229#section-10.4.1 and HTTP status codes at http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
2013-07-13 09:55:50 +02:00
Cory Benfield 555472bf1e Remove urllib3-specific kwargs from general code 2013-07-04 10:34:43 +01:00
Flavio Curella a8cf5b8502 keep the double quotes, but don't escape them 2013-07-01 15:48:48 -05:00
Flavio Curella cdab4fabf4 unquote double-quotes cookie values 2013-07-01 13:51:40 -05:00
Vikram Oberoi 188e7609b3 .netrc settings shouldn't blow away explicit auth settings on a session 2013-06-27 16:43:40 -04:00
Chen Huang 9083735963 @1434 Fix https://github.com/kennethreitz/requests/issues/1434 2013-06-25 18:38:59 -04:00
Cory Benfield 1faa76a86f Use the new urllib3 stream generator. 2013-06-18 17:56:35 +01:00
Cory Benfield ecf57cac5c Update urllib3 to cffbd6b317 2013-06-18 17:47:23 +01:00
Roman Haritonov 716b627c1e Don't reuse PreparedRequest on redirects 2013-06-08 14:41:34 +04:00
Kenneth Reitz 8028103b71 Merge pull request #1400 from jam/master
Retrieve environment proxies using standard library functions
2013-06-08 03:20:18 -07:00
Kenneth Reitz 8430e6ccbb Merge pull request #1334 from rcarz/master
resolve_redirects no longer throws an InvalidSchema exception when the scheme is uppercase
2013-06-08 03:18:25 -07:00
Kenneth Reitz d4c461042b Merge pull request #1385 from ViktorHaag/master
Cope with mixed-case URL schemes (like 'HTTP') by lower-ifying 'url' string before calling startswith() on it
2013-06-08 03:17:38 -07:00
Kenneth Reitz 60b1a0ba13 Merge pull request #1381 from expandrive/master
Don't force chunked transfer on 0-length file-like object.
2013-06-08 03:16:32 -07:00
Kenneth Reitz eec9bdd434 Merge pull request #1408 from wasw100/master
cookies.morsel_to_cookie morsel['expires'] can't be strtime, and morsel['max-age'] convert to expires problem repair
2013-06-08 03:14:32 -07:00
Thomas Weißschuh 2ed976ea71 update urllib3 to 60ba176f5d 2013-06-08 08:22:15 +00:00
wasw100 767f758aac cookies.morsel_to_cookie morsel['expires'] can't be strtime, and max-age convert to expires problem repair 2013-06-07 00:02:45 +08:00
wasw100 961790f95c cookies.morsel_to_cookie(morsel) raise TypeError repaired.
morsel_to_cookie(mosel) method raise TypeError: create_cookie() got unexpected keyword arguments: ['path_specified', 'domain_specified', 'port_specified', 'domain_initial_dot'].

so we should remove these param from create_cookie(...)
2013-06-06 19:15:09 +08:00
James Clarke 93be6916f9 Use urllib to retrieve environment proxies.
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.
2013-05-31 18:19:34 -07:00
Bob Carroll 72e155e529 resolve_redirects now checks for a scheme before converting the scheme to lowercase, added tests or the scheme casing 2013-05-26 14:44:22 -07:00
Bob Carroll e715d7184b resolve_redirects no longer throws an InvalidSchema exception when the scheme is uppercase 2013-05-26 14:43:00 -07:00
Kenneth Reitz 3bb13f8fbb v1.2.3 2013-05-25 12:48:10 -04:00
Viktor Haag 01993d21dc added tests for mixed-case scheme URLs, changed adapters passing down URLs into urllib3 by lower-ifying them so that the underlying pool manager can effectively pool by scheme as dictionary key 2013-05-24 16:14:14 -04:00
Viktor Haag 5e94f38001 - fixed func call syntax on lower to lower()
- added test cases for trying to test GETS on mixed-case schemas
2013-05-24 14:01:30 -04:00
Viktor Haag 3004ad5398 Lower-ify url before checking against prefix with startswith() 2013-05-24 11:26:00 -04:00
Jeff Mancuso e7c9bbb96f Only switch to chunked if we don't know the length of a file like object. This fixes the case of trying to upload a 0-length file - chunked upload was being forced. Services like S3 that disallow chunked upload will fail. 2013-05-23 11:21:29 -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