Commit Graph

1492 Commits

Author SHA1 Message Date
Kenneth Reitz 0d8c08cd22 binary data upload bug test 2012-02-15 02:03:29 -05:00
Kenneth Reitz ab4c03adc3 cleanups 2012-02-15 02:03:13 -05:00
Kenneth Reitz 75b0c4be1b latin1, remove unicode_literals
Fixes #407
2012-02-15 02:01:36 -05:00
Kenneth Reitz 4a8e6415c7 sp 2012-02-15 01:47:08 -05:00
Kenneth Reitz 58bf158840 RuntimeError 2012-02-15 01:46:06 -05:00
Kenneth Reitz c0f066626e whitespace 2012-02-15 01:42:57 -05:00
Kenneth Reitz 69c7a8638e make all the tests 2012-02-15 01:42:52 -05:00
Kenneth Reitz 1b6f1b091c Merge branch '400-header_expand-unicode' of https://github.com/acdha/requests into develop 2012-02-15 01:25:29 -05:00
Kenneth Reitz d39cdc45d1 decode response url again 2012-02-15 01:21:38 -05:00
Kenneth Reitz 7f761f3adf history for 0.10.2 2012-02-15 01:18:41 -05:00
Kenneth Reitz 5e76943f02 Merge branch 'develop' of https://github.com/Lukasa/requests into develop 2012-02-15 01:08:10 -05:00
Kenneth Reitz b887ea3b60 Merge branch 'mgiuca-uri-cleanup-nonpath' into develop 2012-02-15 01:00:52 -05:00
Matt Giuca 690426ac86 Added Matt Giuca to AUTHORS. 2012-02-15 12:06:34 +11: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 3ae0ff3685 Added test cases for URI cleaning in the query part (Issue #429). 2012-02-15 12:00:27 +11:00
Cory Benfield 80e29bfcab Change the RFC we reference. 2012-02-14 14:11:25 +00:00
Cory Benfield d7107c2cdc Make clearer the source of forbidden characters 2012-02-14 12:58:35 +00:00
Cory Benfield 658da765ec Keep non RFC cookie key characters separate.
Moved the characters that we accept in keys but that the RFC forbids
into a separate string to keep track of them.
2012-02-14 10:25:40 +00:00
Kenneth Reitz 9e2f5dd0ed Merge branch 'py3-uri-encoding' of https://github.com/mgiuca/requests into develop 2012-02-14 04:30:10 -05:00
Matt Giuca 1ffce4f7dc Simplify requote_path.
It no longer needs to split on '/' since '/' will not be encoded.
2012-02-14 12:57:49 +11:00
Matt Giuca fcac1c3746 Fixed URI encoding of reserved characters (Issue #369).
Previously, util.requote_path would unquote and requote all characters,
causing reserved characters to become encoded (changing the semantics of the
URI). Now, it has special code for unquoting just the unreserved characters,
then quotes only illegal characters.
This ensures that illegal characters are fixed, and URIs are normalised, but
reserved characters do not erroneously become quoted.
Test case test_session_with_escaped_url now passes.
2012-02-14 12:51:03 +11:00
Matt Giuca c0763bb8d5 Changed test case test_path_is_not_double_encoded.
Uses the space character instead of ~ as a test (since ~ is unreserved, it
shouldn't really be encoded at all).
2012-02-14 12:49:31 +11:00
Matt Giuca 75bd9d0e94 Added test case testing URI normalisation.
Tests that percent-encoded unreserved characters get de-encoded.
2012-02-14 12:20:48 +11:00
Matt Giuca 08bc1198d3 Added test case for Issue #369.
Tests that legal reserved and unreserved characters in the path are not
percent-encoded. Currently fails.
2012-02-14 12:15:32 +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
Matt Giuca 329efcae6e Added test case for quoted and illegal characters in the URL.
This is a test case for issue #369.
It passes in Python 2, but fails in Python 3 (though the test suite doesn't
actually work in Python 3, it can be shown to fail with some modification).
2012-02-14 11:47:14 +11:00
Kenneth Reitz 5a2a78f7df Merge pull request #425 from Lukasa/develop
Issue #335: Accept unusual keys in cookies.
2012-02-13 16:14:39 -08:00
Cory Benfield f72c13ffda Accept unusual keys in cookies.
The Oreos module throws CookieErrors when it catches keys that have
characters that shouldn't be in them, like colons and braces. Other
services are happy to send out such keys, however. This commit makes
requests non-standards compliant, just like everyone else is.
2012-02-14 00:10:26 +00:00
Chris Adams 0a17badb21 header_expand: handle Unicode strings (closes #400) 2012-02-13 11:10:05 -05:00
Kenneth Reitz 12f9aa3669 Merge pull request #410 from eriolv/develop
Fix SyntaxError on Python3 because "except Error, e" is not supported anymore
2012-02-12 02:16:48 -08:00
Kenneth Reitz afa2e86a4d Merge pull request #413 from bancek/patch-1
Typo fix in oreos/structures.py
2012-02-06 09:08:03 -08:00
Luka Zakrajšek b7842ab34b Typo fix in oreos/structures.py 2012-02-06 13:42:34 +01:00
Greg Taylor f8b3141204 Use basestring instead of str to determine when to return headers as-is. This makes sure that unicode instances aren't enumerated. 2012-02-05 13:57:35 -05:00
Daniele Tricoli c40d6d0509 Since requests 0.10.1 dropped Python5 support, to catch an exception and
store the exception object in a variable the "as" keyword can be used so
Python3 will not raise a SyntaxError
2012-02-05 04:18:22 +01:00
Kenneth Reitz a74481a1d4 Update docs/community/faq.rst 2012-02-03 13:24:00 -05:00
Kenneth Reitz b898415d0d :trollface:
because i can.
2012-02-02 17:23:47 -05:00
Kenneth Reitz b47effe5d8 test #2 2012-02-01 13:35:34 -05:00
Kenneth Reitz 4f10605389 quick test 2012-02-01 13:33:59 -05:00
Kenneth Reitz 120e62900b Native Instruments! 2012-01-31 02:15:55 -05:00
Kenneth Reitz 986704dc62 v0.10.2 2012-01-30 09:41:09 -05: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
Chris Adams 495646bb6a async: force prefetch=True on send
… otherwise we can run out of sockets before any of the responses are ever
processed
2012-01-29 18:42:48 -05:00