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 chin
Recipients chin, gregory.p.smith, r.david.murray
Date 2009-04-07.15:21:55
SpamBayes Score 0.0004037335
Marked as misclassified No
Message-id <1239117717.09.0.101001687086.issue5714@psf.upfronthosting.co.za>
In-reply-to
Content
Actually urlparse.urljoin implements RFC 2396

Is it true that 'CGIHTTPServer._url_collapse_path_split' is just a
inverted 'urlparse.urljoin' ?
"""
>>> urlparse.urljoin('http://a/b/c/','g')
'http://a/b/c/g'
>>> urlparse.url_collapse_path_split('http://a/b/c/g')
('/http:/a/b/c', 'g')
>>> urlparse.urlsplit('http://a/b/c/g')
SplitResult(scheme='http', netloc='a', path='/b/c/g', query='', fragment='')
"""

And there is existing function 'urlparse.urlsplit'.
I think "CGIHTTPServer._url_collapse_path_split" is just a customized
version of latter, and should be rewritten using 'urlparse.urlsplit'.
History
Date User Action Args
2009-04-07 15:21:57chinsetrecipients: + chin, gregory.p.smith, r.david.murray
2009-04-07 15:21:57chinsetmessageid: <1239117717.09.0.101001687086.issue5714@psf.upfronthosting.co.za>
2009-04-07 15:21:56chinlinkissue5714 messages
2009-04-07 15:21:55chincreate