Commit Graph

952 Commits

Author SHA1 Message Date
Kenneth Reitz 3514816d63 Merge remote-tracking branch 'origin/develop' into develop 2012-08-21 00:43:27 +10:00
Kenneth Reitz e5fc88ad37 MultiDict 2012-08-21 00:43:16 +10:00
Kenneth Reitz 2d5d6f99ab Merge pull request #797 from sigmavirus24/fix_order
Fix order of data+params
2012-08-20 00:55:17 -07:00
Joseph McCullough c19650b00f Fix SSL3 error on Ubuntu 12.04 2012-08-19 22:10:18 -05:00
Ian Cordasco 6d418d9132 Fix a fairly critical error on my part. 2012-08-19 16:38:40 -04:00
Ian Cordasco f48c78c9ee Change ordering of data + params back.
Fixes #795
2012-08-19 16:38:32 -04:00
Kenneth Reitz b130b98086 v0.13.7 2012-08-19 10:46:55 +10:00
Kenneth Reitz 385217e55c Merge pull request #789 from zigmonty/http_digest_fixes
HTTPDigestAuth fixes
2012-08-18 17:42:40 -07:00
Kenneth Reitz 489ce1c8a9 Merge pull request #779 from Lukasa/develop
Make sure proxy exclusions work properly.
2012-08-18 17:40:53 -07:00
Ian Cordasco ab56e4a9f1 Fix python3 tests.
I wasn't thorough enough with how I dealt with headers. Most of the header
logic in the Request object utilizes dictionary properties which will not work
with a key/value list.

I'll dig more into this, but I know the rest of the features are more
important so I'll take my time on this and send a separate pull request.
2012-08-18 14:41:13 -04:00
Ian Cordasco f01694e274 All tests pass, time for a PR. 2012-08-18 13:47:14 -04:00
Ian Cordasco e02da89337 Merge branch 'develop' into key_val_lists
Conflicts:
	requests/models.py
	tests/test_requests.py

Remove some of Lukasa's duplication of my efforts in _encode_data.
2012-08-18 12:15:03 -04:00
Peter Montagner 5017aeb06c Save credentials in the HTTPDigestAuth object and replay them if the user reuses the object. 2012-08-18 14:31:24 +10:00
Peter Montagner 53d454c813 Release connection in digest auth 401 handler to allow the connection to be reused. 2012-08-18 12:53:57 +10:00
Locker537 42d0a2169e Whitespace fixes following PEP8. 2012-08-16 17:38:35 -04:00
Cory Benfield 00b4ca3b74 Don't get hung up on ports in proxies. 2012-08-15 18:16:27 +01:00
Cory Benfield 79d53d3b8a Throw InvalidURL not UnicodeError on bad label. 2012-08-13 21:18:56 +01:00
Jakub Roztocil dee3693ea0 Use BytesIO for bytes.
This fixes a TypeError on Python 3 that ocurred when passing
bytes as the values for files.
2012-08-10 19:49:03 +02:00
Jakub Roztocil cfa627ae62 Fixed encoding of fields with the same name.
* Properly handle repeated data fields for multipart/form-data requests (#737)
* Allow a list of 2-tuples as the `files` agument.
* Consistently serialize lists a of parameters (#729).
2012-08-10 19:49:03 +02:00
Kenneth Reitz a65e8b4a22 Merge pull request #767 from stefanp/develop
Wrap socket.error in ConnectionError (+ unit tests)
2012-08-08 13:23:10 -07:00
Stefan Praszalowicz 875c9e18ab Wrap socket.error in ConnectionError (+ unit tests) 2012-08-08 11:12:32 -07:00
Cory Benfield 6166ba7e13 Accept objects with string representations as URLs. 2012-08-08 13:33:25 +01:00
Ian Cordasco ceec572cb9 Merge branch 'develop' into key_val_lists
Conflicts:
    requests/models.py
2012-08-07 12:11:15 -04:00
Shivaram Lingamneni 000c105303 propagate self.prefetch on redirect
fixes RequestsTestSuite.test_prefetch_redirect_bug
2012-08-06 15:55:52 -07:00
Shivaram Lingamneni 030ead9c36 properly handle send(prefetch=False)
fixes RequestsTestSuite.test_prefetch_return_response_interaction
2012-08-06 15:55:52 -07:00
Cory Benfield 55bf436f8f Correctly handle encoding numbers when POSTing. 2012-08-06 17:40:27 +01:00
Kenneth Reitz fc6ddfd78a v0.13.6 2012-08-06 02:45:52 -04:00
Kenneth Reitz b13c24d7b9 Merge pull request #760 from slingamn/fix_leak.release
address connection leak issue from #520
2012-08-05 21:38:12 -07:00
Shivaram Lingamneni 3c0b94047c address connection leak issue from #520
* prefetch now defaults to True, ensuring that by default, sockets
  are returned to the urllib3 connection pool on request end
* sessions now have a close() method, notifying urllib3 to close pooled
  connections
* the module-level API, e.g., `requests.get('http://www.google.com')`,
  explicitly closes its session when finished

When prefetch is False, the open socket becomes part of the state of the
Response object, and it's the client's responsibility to read the whole
body, at which point the socket will be returned to the pool.
2012-08-05 21:09:13 -07:00
Ian Cordasco 1722f28971 Add to_key_val_lists to avoid repetition.
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.
2012-08-05 23:29:10 -04:00
Ian Cordasco d82d124152 Merge branch 'develop' into key_val_lists 2012-08-05 16:59:24 -04:00
Marcus McCurdy f60579ddda Moved fix for #747 to compat module 2012-08-04 09:35:32 -04:00
Marcus McCurdy 493ea93469 Fixed issue #747
Bound the name builtin_str to __builtin__.str and added another check
for this class since the str class was rebound to unicode in compat.
This issue was only for Python 2 as well.
2012-08-03 23:13:17 -04:00
Ian Cordasco 2d5e38f30a params now accepts a k/v list.
Also added test for params accepting k/v lists.
2012-08-03 22:24:52 -04:00
Ian Cordasco 644c6f9134 Merge branch 'develop' into key_val_lists 2012-08-03 12:02:01 -04:00
Ian Cordasco b4bc76f8eb Fix raise_for_status() 2012-08-03 11:42:36 -04:00
Ian Cordasco 5ff165a1e2 Better handling of invalid files.
I stole the idea from _encode_params in all candor.
2012-08-02 17:31:30 -04:00
Ian Cordasco 1efd06a87d This simplification should work.
Probably should write a test case where it should fail though.
2012-08-02 17:31:30 -04:00
Ian Cordasco 46b6207f05 Fix python3 errors. 2012-08-02 17:31:30 -04:00
Ian Cordasco 42ddc4c9e8 Need to write tests but this looks good so far. 2012-08-02 17:31:30 -04:00
Kenneth Reitz 664880db62 Merge pull request #751 from Lukasa/develop
Catch socket.gaierror in safe mode.
2012-08-02 13:53:05 -07:00
Berker Peksag 204649521b Refactoring in |raise_for_status| method.
- Simplified the if statements.
- Remove duplicate code.
2012-08-02 23:45:06 +03:00
Cory Benfield 4f40b3befc Catch socket.gaierror in safe mode. 2012-08-02 12:16:41 +01:00
Kenneth Reitz b47418533a Merge pull request #744 from tax/develop
Set content type before authentication
2012-07-30 18:13:17 -07:00
Paul 5e175ef24c Set content type before authentication
AWS S3 authentication adds content type header (when it exist) to
canonical string that is signed. Since it is set after authentication
is done authentication on S3 fails
2012-07-27 19:18:13 +08:00
Kenneth Reitz 9abc9ad1b3 v0.13.5 2012-07-27 03:23:33 -04:00
Kenneth Reitz 767751599e v0.13.4 2012-07-27 02:21:56 -04:00
Kenneth Reitz e0fed46561 Solves #722 2012-07-27 01:48:25 -04:00
Kenneth Reitz 81207783a2 Merge remote-tracking branch 'origin/develop' into develop 2012-07-27 01:39:21 -04:00
Kenneth Reitz c65065177f ordered dict 2012-07-27 01:39:17 -04:00