Senthil Kumaran <orsent...@gmail.com> added the comment:

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.

----------
status: open -> pending

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10231>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to