Mark Lawrence added the comment:
I've tried investigating this but I've got lost so I'll have to pass the buck.
I've got confused because of the code moving around in Python 2 and the library
changes going to Python 3 :-(
--
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.3
Changes by Terry J. Reedy tjre...@udel.edu:
--
versions: +Python 3.3 -Python 2.7, Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5714
___
Senthil orsent...@gmail.com added the comment:
Yes, the parsing best be done in urlparse.
As this function claims to do step 6 of RFC2396, I am surprised why it
cannot be done by using existing urlparse functions itself.(Because, the
tests for RFC2396 compliance covers those cases too).
Leonid Vasilev vsleo...@gmail.com added the comment:
I'd Wrote a patch for this.
Perhaps some unittests are needed.
--
keywords: +patch
nosy: +chin
Added file: http://bugs.python.org/file13644/issue5714_withdoc.diff
___
Python tracker
R. David Murray rdmur...@bitdance.com added the comment:
Yes, unit tests are always needed for any change.
Gregory, why is a function that does two things (collapse and split) a
good candidate for a public API? It results in a pretty awkward name :)
I'm not saying it's necessarily a bad idea,
Leonid Vasilev vsleo...@gmail.com added the comment:
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'
Gregory P. Smith g...@krypto.org added the comment:
urlparse.urljoin and urlparse.urlsplit do not do what is required for
this function. urljoin does not collapse paths. urlsplit has nothing
to do with paths.
I agree r.david.murray that it is odd that it does two functions at once
(the
New submission from Gregory P. Smith g...@krypto.org:
CGIHTTPServer._url_collapse_path_split should probably live in a more
general library and become a documented API. Perhaps in urlparse?
--
keywords: easy
messages: 85679
nosy: gregory.p.smith
priority: normal
severity: normal