kennethreitz/requests — pull request #641 by mwielgoszewski (2012-05-28 14:58:25+00:00)
Title: fix for #630 - unquote_unreserved raising ValueError on invalid URI-esca...

...pe sequences

Especially relevent to security testing, an HTTP client will be asked to send requests containing invalid uri-escape sequences. This raises a ValueError if an attempt is made to parse a string argument as a signed integer with radix 16. The method unquote_unreserved attempts to unquote any uri-escaped sequences in the unreserved character set. Because a uri-escaped character is hex-encoded, we can simply add a check to ensure the sequence is alphanumeric prior to parsing.