kennethreitz/requests — pull request #273 by rfk (2011-11-17 00:04:53+00:00)
Title: Correct handling of URLs with quoted slashes.

The Request class currently does a urllib.quote(urllib.unquote(path)) cycle to ensure consistent quoting on the input URL. Unfortunately this breaks paths that contain quoted slashes (i.e. "%2F") since they get unquoted by urllib.unquote but are re-quoted by urllib.quote.

This patch adds a requote_path() function that does the same thing but is careful not to destroy quoted slashes.