This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Nam.Nguyen, martin.panter, serhiy.storchaka, vstinner
Date 2017-06-20.13:23:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1497965005.96.0.879588186691.issue30500@psf.upfronthosting.co.za>
In-reply-to
Content
When porting the change to Python 3.4, I found this older change:

     if _hostprog is None:
-        _hostprog = re.compile('^//([^/?]*)(.*)$')
+        _hostprog = re.compile('//([^/?]*)(.*)', re.DOTALL)
 
     match = _hostprog.match(url)
     if match:
-        host_port = match.group(1)
-        path = match.group(2)
-        if path and not path.startswith('/'):
+        host_port, path = match.groups()
+        if path and path[0] != '/':
             path = '/' + path
         return host_port, path

made by:

commit 44eceb6e2aca4e6d12ce64fa0f90279ffff19c25
Author: Serhiy Storchaka <storchaka@gmail.com>
Date:   Tue Mar 3 20:21:35 2015 +0200

    Issue #23563: Optimized utility functions in urllib.parse.

With this change, newlines are now accepted in URLs.

@Serhiy: Was it a deliberate change?
History
Date User Action Args
2017-06-20 13:23:25vstinnersetrecipients: + vstinner, martin.panter, Nam.Nguyen, serhiy.storchaka
2017-06-20 13:23:25vstinnersetmessageid: <1497965005.96.0.879588186691.issue30500@psf.upfronthosting.co.za>
2017-06-20 13:23:25vstinnerlinkissue30500 messages
2017-06-20 13:23:25vstinnercreate