Kenneth Reitz
54ad646067
merge 2.0 insto master
2013-09-24 14:13:28 -04:00
Kenneth Reitz
23ced527f7
Merge pull request #1503 from skastel/master
...
Fixing error return to be consistent with tuple return at the end of the method
2013-09-24 10:48:07 -07:00
Cory Benfield
61421843bc
Python defaults arguments are hard.
2013-09-13 14:10:09 +01:00
Kenneth Reitz
09c52e7282
Merge pull request #1537 from Lukasa/datetime
...
Allow non-string objects to be posted as data alongside files.
2013-08-21 11:46:27 -07:00
Cory Benfield
f44b86e039
Allow non-string objects to be data with files
2013-08-17 07:27:58 +01:00
Paul Matthews
61617e74ed
Raise an error for unsupported hook event
...
* Raises a ValueError for an unsupported hook event
2013-08-12 15:27:17 +01:00
Stephen Huenneke
9dd823c289
Raising ValueError's when we're passed inconsistent POST data and files dict.
2013-08-06 11:04:03 -07:00
Cory Benfield
a5e5a51fb4
Catch UnsupportedOperation.
2013-08-03 19:24:23 +01:00
Kenneth Reitz
abfb38bd57
Merge pull request #1508 from dieterv/master
...
remove duplicate comment
2013-07-31 18:36:07 -07:00
Kenneth Reitz
1a6637c285
Merge branch 'keytype' of git://github.com/Lukasa/requests into 2.0
2013-07-31 21:25:57 -04:00
Kenneth Reitz
d5a8816926
Merge pull request #1498 from Lukasa/incompleteread
...
Wrap IncompleteRead in ChunkedEncodingError.
2013-07-31 18:23:14 -07:00
Kenneth Reitz
6b13ecdc85
Merge pull request #1501 from sigmavirus24/remove_setting_of_hooks
...
Fix duplication of efforts caught by @dofelw
2013-07-31 18:22:58 -07:00
Robert Estelle
0ab7a52f7c
Merge settings when creating PreparedRequest, don't copy Request.
2013-07-31 13:42:02 -07:00
Dieter Verfaillie
852de116dd
remove duplicate comment
...
This is already mentioned at line 357...
2013-07-31 09:29:24 +02:00
Robert Estelle
ee90f0af60
Shallow copy of Request fields in Request.copy()
...
This prevents e.g. modifying the headers of a copied request from
affecting the headers of its source and vice versa. Copying is used with
the intent to mutuate, so allowing this kind of mutation of fields makes
sense.
Is a deep copy better?
2013-07-30 22:59:53 -07:00
Robert Estelle
b5c136152f
Prepare requests with session settings separately from sending.
2013-07-30 21:39:36 -07:00
Stephen Huenneke
f75ee9fb6e
Making sure we check for str/unicode.
2013-07-29 14:42:47 -07:00
Stephen Huenneke
8d9d9fb064
Fixing error return to be consistent with tuple return at the end of the method.
2013-07-29 13:31:06 -07:00
Cory Benfield
7de6b1e162
Instantiate the CID directly.
...
No need to do this the slow way now. Thanks to Colin (@cdunklau) for the
idea.
2013-07-29 14:52:44 +01:00
Cory Benfield
f5775594cc
Header keys should be native strings.
...
This commit follows a discussion on IRC. For more information, see the
Pull Request associated with it.
2013-07-29 14:52:44 +01:00
Ian Cordasco
37786613e0
Fix duplication of efforts caught by @dofelw
2013-07-29 08:09:07 -05:00
Cory Benfield
79f3e69f5e
Wrap IncompleteRead in ChunkedEncodingError.
2013-07-28 07:42:17 +01:00
Cory Benfield
9473f15909
Merge pull request #1494 from Lukasa/close
...
Document the Response.close() method.
2013-07-27 23:04:34 -07:00
Kenneth Reitz
77bd9c4a9d
Merge pull request #1476 from sigmavirus24/add_copy_to_prepared_requests
...
[2.0] Add copy method to PreparedRequest objects
2013-07-26 18:16:00 -07:00
Cory Benfield
f401287afb
Document the Response.close() method.
2013-07-25 19:10:42 +01:00
David Pursehouse
4f64938ff0
Fix a few warnings flagged by PyDev
...
- Unused import of urlparse
- Unnecessary definition of variable
- Incorrect indentation
2013-07-22 17:14:45 +09:00
Ian Cordasco
b84547d786
Add copy method to PreparedRequest objects
2013-07-20 17:08:35 -04:00
Cory Benfield
555472bf1e
Remove urllib3-specific kwargs from general code
2013-07-04 10:34:43 +01:00
Cory Benfield
1faa76a86f
Use the new urllib3 stream generator.
2013-06-18 17:56:35 +01: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
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
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
Ian Cordasco
88fda94218
Prevent a KeyError when there's no link headers
2013-05-08 23:26:49 -04: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
schlamar
59f916ca4a
Use streaming decompression feature of urllib3.
2013-04-10 08:08:33 +02:00
Ian Cordasco
afcc883d7f
Fix #1293
2013-04-06 11:26:52 -04:00
Jason Emerick
e7247ce3f6
model the encode_files data handling after encode_params
2013-04-02 14:22:49 -04: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
Ian Cordasco
0cd23d8d6e
Fix the tests and unseparate comments from code
...
See the comments on the previous few commits on GitHub.
2013-03-28 08:33:34 -04:00
Ian Cordasco
1d5c4f3f0f
This should take care of #1266
...
We were sending 'None' as the Content-Length on requests where the body was a
generator. This commit should prevent that entirely.
2013-03-27 23:26:11 -04:00
Justin Fenn
6963b8490c
Clarify streaming behavior in iter_lines doc
2013-03-25 12:20:33 -07:00
Kenneth Reitz
92f7478174
first
2013-03-22 15:48:27 -04:00
Kenneth Reitz
19d38d502f
actually cleanup url authentication
2013-03-22 15:47:20 -04:00
Kenneth Reitz
1325409560
simplify get_auth_from_url call
2013-03-22 00:12:58 -04:00
Jamu Kakar
7d217bf9bd
- Pull credentials out of the URL when possible.
2013-03-21 17:55:08 -07:00
Dmitry Medvinsky
c4f9340fb4
Add ability to pass response to HTTPError()
...
Just a little refactoring, but it seems nicer to me to be able to pass
the response when constructing the `HTTPError` instance instead of
constructing it and then changing the member variable.
2013-03-03 10:05:42 +04:00