Add a trailing slash for twitter.com

This commit is contained in:
Kenneth Reitz
2011-10-04 11:33:11 -04:00
parent 6e90aa7d65
commit 04bcb74970
+4
View File
@@ -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')