Author orsenthil
Recipients hfuru, jerith, orsenthil, vstinner
Date 2010-11-20.16:29:52
SpamBayes Score 1.76704e-07
Marked as misclassified No
Message-id <1290270595.85.0.575802390463.issue10231@psf.upfronthosting.co.za>
In-reply-to
Content
I have doubts on the validity of this bug itself.

- First is, query and fragment are usually for the file being served from the webserver, not on the directories. If there are characters such as '?' and '#'  in the directory names, which may get featured in the path, then those should be quoted in the request. So foo/dir?baz is wrong where as foo/dir%3Fbaz it the correct request.

We see the 301 redirection code in http.server code, the for the cases wherein it the "directory" is not specified with '/'. It just adds the '/' to get to the path. The code explicitly checks that path is directory before doing '/' added 301 redirection.

In the patch's first case:

+        response = self.request(self.tempdir_name + '?foo')

This is wrong because /tmp/somthing?foo (Is invalid path - It should be quoted for it be a PATH and follow the 301 redirection to list its contents by appending '/')

To verify the above points, just create a file foo?bar and directory foo?baz and serve those using http.server, you come to know that the interpretation by the OP does not come up here.

If you any counter arguments to the above, please provide good examples or a better yet, the test_httpservers patch.
History
Date User Action Args
2010-11-20 16:29:55orsenthilsetrecipients: + orsenthil, hfuru, vstinner, jerith
2010-11-20 16:29:55orsenthilsetmessageid: <1290270595.85.0.575802390463.issue10231@psf.upfronthosting.co.za>
2010-11-20 16:29:52orsenthillinkissue10231 messages
2010-11-20 16:29:52orsenthilcreate