Commit Graph

37 Commits

Author SHA1 Message Date
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 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
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
Kenneth Reitz e7bcc3b332 oh snap 2012-01-23 01:32:09 -05:00
Kenneth Reitz b001fcf968 SimpleCookie 2012-01-23 01:02:16 -05:00
Kenneth Reitz 11c4315da3 good 2012-01-23 00:43:01 -05:00
Kenneth Reitz b0e2e4f284 blah 2012-01-23 00:15:25 -05:00
Johannes Gorset a0ae2e6c7b Default the encoding of "text" media subtypes to "ISO-8859-1"
Ref. RFC2616 (HyperText Transfer Protocol), section 3.7.1 (Canonicalization and Text Defaults).
2012-01-21 11:01:45 +01:00
Chase Sterling 9c6ffc5303 Refactor stream_decode_gzip and _deflate into one function, stream_decompress.
stream_decompress will now iterate over the raw data if there is a problem with decompression
Remove gzip decoding from Response.content, as urllib3 was doing it anyway.
2011-12-30 22:18:08 -05:00
Chase Sterling f80984f377 Implement automatic deflating when using response.iter_content. refs #327
Refactor response.iter_lines to use responset.iter_content.
2011-12-30 18:55:56 -05:00
Nick Hatch a6412b02ba Fix spelling errors, typos. 2011-12-11 01:58:55 -06:00
Kenneth Reitz 6421ec1784 iter_content uses new encoding system 2011-11-19 16:12:38 -05:00
Ryan Kelly f7fdfe8b9a Correct handling of URLs with quoted slashes. 2011-11-17 11:00:02 +11:00
Kenneth Reitz 0086f97b65 Guess filename.
Closes #192
2011-11-13 00:36:22 -05:00
Kenneth Reitz 9966017a49 Add new utilities from werkzeug 2011-10-23 14:46:58 -04:00
travis 055f7c1eb6 Some Doc and doctoring fixes by the Speling Poleece. 2011-10-19 10:00:13 -05:00
Armin Ronacher 0d6773c68c Fail silently if encoding header is missing 2011-09-03 18:04:51 +02:00
Armin Ronacher 41876fd8c6 Implemented content streaming for responses. 2011-09-03 17:59:30 +02:00
Kenneth Reitz 6d25fff3f9 Added Josselin Jacquard to AUTHORS 2011-08-30 23:58:31 -04:00
Josselin Jacquard 1ecb593c7b Fix a bug when content-type is empty 2011-08-30 12:04:48 +02:00
Kenneth Reitz dba7a5a7e2 shortcut strings 2011-08-28 03:22:20 -04:00
Kenneth Reitz 3b9fc987b8 cleanup 2011-08-28 03:09:26 -04:00
Kenneth Reitz e272ec13c3 tuples too 2011-08-28 03:07:45 -04:00
Kenneth Reitz b97b4439c0 header expanding 2011-08-28 02:40:19 -04:00
Kenneth Reitz 1d0a5b2665 whitespace 2011-08-23 23:09:51 -04:00
Kenneth Reitz 636e61d68b utils.unicode_from_html 2011-08-23 23:09:09 -04:00
Kenneth Reitz a94541d38c Only decode unicode from http headers
HTTP client, not HTML
#115
2011-08-23 23:03:18 -04:00
Kenneth Reitz 596aceb185 big docs update 2011-08-20 22:47:03 -04:00
Kenneth Reitz 873d128c5a docstrings for utils module 2011-08-20 19:58:00 -04:00
Kenneth Reitz 4906686186 utils.decode_gzip 2011-08-20 19:46:50 -04:00
Kenneth Reitz 8fbb1e6d97 move encoding methods into utils for external consumption 2011-08-20 19:17:41 -04:00
Kenneth Reitz e477fce211 add_dict_to_cookiejar
Signed-off-by: Kenneth Reitz <me@kennethreitz.com>
2011-08-17 02:25:56 -04:00
Kenneth Reitz f7024a6000 super cookiejar_from_dict powwerrrs 2011-08-17 02:01:13 -04:00
Kenneth Reitz ec33ce9d29 sp. 2011-08-17 01:32:12 -04:00
Kenneth Reitz d9e5717377 cookiejar_from_dict
#12
2011-08-17 01:29:58 -04:00
Kenneth Reitz 7e255177dc get cookies from response
#116
2011-08-17 01:23:49 -04:00