Message85715
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'. |
|
Date |
User |
Action |
Args |
2009-04-07 15:21:57 | chin | set | recipients:
+ chin, gregory.p.smith, r.david.murray |
2009-04-07 15:21:57 | chin | set | messageid: <1239117717.09.0.101001687086.issue5714@psf.upfronthosting.co.za> |
2009-04-07 15:21:56 | chin | link | issue5714 messages |
2009-04-07 15:21:55 | chin | create | |
|