Commit Graph

2050 Commits

Author SHA1 Message Date
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 64646182b2 Merge pull request #772 from Lukasa/develop
First pass at documenting encodings and RFC compliance.
2012-08-10 09:05:08 -07:00
Kenneth Reitz 56b01bf0e6 Merge pull request #773 from randomir/develop
Tests: python2.6 compat (`assertIn` new in python2.7)
2012-08-10 09:03:09 -07:00
Radomir Stevanovic 4da4792844 tests: python2.6 compat (assertIn added in 2.7) 2012-08-10 17:51:01 +02:00
Cory Benfield 7a9419ce35 Document encodings and RFC compliance. 2012-08-10 14:47:13 +01:00
Kenneth Reitz 40ba6b4ec1 new button domain 2012-08-08 23:31:30 -05: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
Kenneth Reitz d4f7d67655 Merge pull request #766 from Lukasa/develop
Accept objects with string representations as URLs.
2012-08-08 13:18:39 -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
Cory Benfield e624ae8aea Add test for Issue #423. 2012-08-08 13:33:25 +01:00
Kenneth Reitz bc7b2f9a67 Merge pull request #764 from slingamn/regressions
test and fix regressions from #760
2012-08-06 16:13:59 -07:00
Shivaram Lingamneni 291859c199 fix the tests for python 3 2012-08-06 16:11:45 -07: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
Shivaram Lingamneni 857d8eda3a red tests derived from @dhagrow's examples in #760 2012-08-06 15:53:48 -07:00
Kenneth Reitz a94fcb87d2 Merge pull request #762 from Lukasa/develop
Correctly handle encoding numbers when POSTing.
2012-08-06 14:05:21 -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 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
Kenneth Reitz 1898077f79 Merge pull request #758 from volker48/develop
Develop
2012-08-04 08:39:25 -07:00
Marcus McCurdy f60579ddda Moved fix for #747 to compat module 2012-08-04 09:35:32 -04:00
Marcus McCurdy 2d321b22b7 Merge branch 'develop' of https://github.com/volker48/requests into develop 2012-08-03 23:18:31 -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
Marcus McCurdy 2110f7d18c Fixed test for issue #747 to check for '' instead of 'text/plain' 2012-08-03 23:05:37 -04:00
Marcus McCurdy 12328d6e58 Added a test to expose issue #747 2012-08-03 20:09:56 -04:00
Kenneth Reitz b5ca4b4430 Merge pull request #754 from sigmavirus24/develop
Fix raise_for_status()
2012-08-03 09:21:28 -07:00
Ian Cordasco b4bc76f8eb Fix raise_for_status() 2012-08-03 11:42:36 -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
Kenneth Reitz 22179c493e Merge pull request #753 from berkerpeksag/if-statements
Refactoring in |raise_for_status| method.
2012-08-02 13:52:36 -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
Kenneth Reitz 54842cdca9 Merge pull request #752 from anentropic/patch-1
file posting example looked wrong
2012-08-02 04:59:38 -07:00
anentropic fdec88de99 example looked wrong
From what I can tell from the source code (down thru urllib3) the key in the `files` dict is always the 'fieldname', while specifying a custom filename is optional.

So in this example it is confusing to have a fieldname of 'report.xls' (the filename) where all the other examples use a fieldname of 'file'.
2012-08-02 13:56:12 +02: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
Kenneth Reitz 758cd24033 donate 2012-07-28 17:07:53 -04:00
Kenneth Reitz 027effd585 Merge remote-tracking branch 'origin/develop' into develop 2012-07-28 16:56:49 -04:00
Kenneth Reitz ca7ee68656 setup.py 2012-07-28 16:56:14 -04:00
Kenneth Reitz 72f7cbfdc1 gittip 2012-07-28 16:56:00 -04: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
Cory Benfield 02dcc40acd Failing test for Issue #737. 2012-07-27 09:49:39 +01:00
Kenneth Reitz 9abc9ad1b3 v0.13.5 v0.13.5 2012-07-27 03:23:33 -04:00
Kenneth Reitz 767751599e v0.13.4 v0.13.4 2012-07-27 02:21:56 -04:00
Kenneth Reitz 82d343fa00 disable tricky tests 2012-07-27 02:18:31 -04:00
Kenneth Reitz e0fed46561 Solves #722 2012-07-27 01:48:25 -04:00
Kenneth Reitz d74d61e97e changes 2012-07-27 01:40:09 -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