mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Add a trailing slash for twitter.com
This commit is contained in:
@@ -54,6 +54,10 @@ def cleanup_url(url, parent_url=None):
|
||||
if netloc:
|
||||
netloc = netloc.encode('idna')
|
||||
|
||||
# Add a trailing slash to root domain reqests.
|
||||
if not len(path):
|
||||
path = '/'
|
||||
|
||||
if isinstance(path, unicode):
|
||||
path = path.encode('utf-8')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user