Commit Graph

239 Commits

Author SHA1 Message Date
Kenneth Reitz fe10eeb5be SCHEMAS 2012-02-20 12:25:53 -05:00
Kenneth Reitz e7efce91fb models cleanup 2012-02-20 12:21:01 -05:00
Cory Benfield 640538adcb Fail if unsupported schemas are used.
requests only supports http and https. This change enforces that.
2012-02-16 20:20:20 +00:00
Kenneth Reitz dacaae520a bytes data fix for python3 2012-02-15 03:09:26 -05:00
Kenneth Reitz ec109c9ac8 path fixes 2012-02-15 02:53:50 -05:00
Kenneth Reitz 00b13673e3 simplify 2012-02-15 02:28:58 -05:00
Kenneth Reitz 91ac5ba110 don't rely on urllib3's decode 2012-02-15 02:07:55 -05:00
Kenneth Reitz ab4c03adc3 cleanups 2012-02-15 02:03:13 -05:00
Kenneth Reitz d39cdc45d1 decode response url again 2012-02-15 01:21:38 -05:00
Matt Giuca b8298b0710 Rename utils.requote_path to requote_uri.
It is now applied to a whole URI, not just the path.
2012-02-15 12:03:08 +11:00
Matt Giuca 3bd5406c06 Now requotes the entire URL, not just the path (Issue #429). 2012-02-15 12:00:47 +11:00
Matt Giuca cf54f60367 Fixed URI re-encoding on Python 3 (Issue #369).
Request.full_url now performs requoting of the path (like it does in Python 2).
Request.path_url no longer quotes the already-quoted path (double quoting).
Fixed utils.requote_path so it works properly in Python 3.
2012-02-14 11:50:02 +11:00
Kenneth Reitz 2f13956357 Merge branch 'unicode_missing_self' of https://github.com/Telofy/requests into develop 2012-01-30 09:35:53 -05:00
Kenneth Reitz 8d700dd1e5 Merge branch 'pr-urlfix-1' of https://github.com/brendoncrawford/requests into develop 2012-01-30 09:33:31 -05:00
Kenneth Reitz 5be412db13 Brendon Crawford 2012-01-30 09:33:14 -05:00
Telofy a61a861cfb The self was missing again, and I think the two blocks were redundant. 2012-01-30 12:23:43 +01:00
Brendon Crawford c363ca476f Added ability to check if missing trailing slash in path.
Previously this URL would not work:

    http://example.com?foo=bar

But this URL would work:

    http://example.com/?foo=bar

Even though a slash is required for a valid URL, it is a common use case
for the slash to be left out, so it would be a good idea to account for this.
2012-01-29 23:24:54 -08:00
Kenneth Reitz 319b1ed551 Merge branch '239-socket-leak' of https://github.com/acdha/requests into develop 2012-01-29 19:06:41 -05:00
Chris Adams 67f50a0fe5 Less redundant freeing of resources on redirects
With 495646bb6a the double flush is no longer
needed.
2012-01-29 18:45:14 -05:00
Chris Adams b98cc8b4e9 Revert "Initial stop-the-bleeding fix"
This reverts commit 730c0e2e2b.
2012-01-29 18:43:13 -05:00
Kenneth Reitz 4516bd45b2 Release redirected connections.
#239
2012-01-29 18:00:33 -05:00
Chris Adams 730c0e2e2b Initial stop-the-bleeding fix
This is redundant but it avoids crashing otherwise working code. The code-smell
from duplication suggests that this interface should be refactored slightly.
2012-01-29 17:31:59 -05:00
Chris Adams 3020d0e56a Consistent self.cookies usage
This avoids two variables pointing to the same thing and avoids
a duplicate dict update() call
2012-01-29 16:52:08 -05:00
Chris Adams 49bed18a83 Minor PEP-8 cleanup 2012-01-29 16:51:28 -05:00
David Kemp (Work) 80eafe3b63 fix problem with path being double escaped 2012-01-25 16:21:07 +00:00
Mastahyeti 4293e3fdb2 moved call to pre_request hook, allowing for more meaningful use. 2012-01-23 20:56:05 -06:00
Kenneth Reitz 5ed62e1137 don't let that happen... 2012-01-23 02:19:56 -05:00
Kenneth Reitz e7bcc3b332 oh snap 2012-01-23 01:32:09 -05:00
Kenneth Reitz fe6882623c more stuff and things 2012-01-23 00:52:38 -05:00
Kenneth Reitz b0e2e4f284 blah 2012-01-23 00:15:25 -05:00
Kenneth Reitz 128b49a1fb whitespace 2012-01-21 23:00:28 -05:00
Kenneth Reitz 0dbda6665d cleanup 2012-01-21 22:59:57 -05:00
Kenneth Reitz 464279f48d typo
Signed-off-by: Kenneth Reitz <me@kennethreitz.com>
2012-01-21 22:58:38 -05:00
Kenneth Reitz b14a244ab4 simpler 2012-01-21 22:57:24 -05:00
Kenneth Reitz 2c7e920298 don't double decode 2012-01-21 22:56:53 -05:00
Kenneth Reitz b725bfd3fb Use chardet for detection when no encoding is provided. 2012-01-21 22:55:41 -05:00
Kenneth Reitz 70e98e47cf No encoding? r.text is None. 2012-01-21 17:48:51 -05:00
Kenneth Reitz 8e6f98f44e Merge branch 'redsea' into develop 2012-01-21 07:17:30 -05:00
Kenneth Reitz a3b26c7e5b Provide new register_hook system.
#372
2012-01-21 07:13:58 -05:00
Kenneth Reitz efd2b57b92 cleanup docs for request defaults 2012-01-21 01:44:57 -05:00
Kenneth Reitz 47aba0cc20 remove is_error 2012-01-21 01:31:23 -05:00
Kenneth Reitz f5a2b75924 only try to decode if self.encoding is set 2012-01-21 01:28:26 -05:00
Kenneth Reitz 49a38ac89a New bytes/unicode separation.
Response.content for bytes.
New Response.text for unicode.
2012-01-21 01:24:21 -05:00
Johannes Gorset b37fbf30a3 Decode response URL to a unicode string.
Fixes #182
2012-01-20 00:34:44 +01:00
Kenneth Reitz 61a0e85672 Merge pull request #364 from gthank/8efb6cc870bd23de0d8d87708217d818236a733f
Allow sessions and async requests to mix.
2012-01-19 11:12:23 -08:00
Kenneth Reitz 6db255d17d Merge branch 'develop' of github.com:kennethreitz/requests into develop 2012-01-18 21:49:25 -05:00
Chase Sterling d9cb18ad2a Make sure verify=False is respected for session even when there has already been a verified request to the same host.
Update tests to expose the (fixed) problem.
2012-01-18 19:49:22 -05:00
Ronny Pfannschmidt 7f9cef0114 close the chunked fd at the end and honor content chunksizes for a potential first chunk 2012-01-17 18:14:47 +01:00
Hank Gay 8efb6cc870 Allow mixing sessions and async. 2012-01-17 11:44:59 -05:00
Ronny Pfannschmidt 1c8a141711 remove debug print 2012-01-17 17:39:37 +01:00