[issue10231] SimpleHTTPRequestHandler directory bugs
Senthil Kumaran
report at bugs.python.org
Sun Nov 21 16:11:25 CET 2010
Senthil Kumaran <orsenthil at gmail.com> added the comment:
On Sun, Nov 21, 2010 at 12:12:08PM +0000, Jeremy Thurgood wrote:
> I see your point now, but I don't agree with it completely. It seems
> reasonable to allow query parameters to specify things like sort
> order for a directory listing or have a fragment to focus the
> browser on a particular entry.
Can you please point me to some examples where such a kind of behavior
is exhibited or designed?
> On the other hand, if we don't want to support the
> redirect with a fragment or query parameters, we should instead return
> a 400 response.
SimpleHTTPRequestHandler does not support REDIRECT on *a path* (any
path, directory or file, for that matter). This bug was about a
primitive case where directory in the file system is not specified
with '/', it does a Hardcoded 301 redirect and adds a '/'.
>I can't see any situation in which redirecting
> "/something?foo" to "/something?foo/" is the correct behaviour.
As I explained, in the previous post, this would *not happen* in
practical scenarios, because code won't reach that point for valid
URLs.
> A 401 is "Unauthorized", which means the server is asking for
> authentication -- I don't think that's relevant here.
I am sorry, this was a typo.
It fails with -> urllib.error.HTTPError: HTTP Error 400: Bad Request
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10231>
_______________________________________
More information about the Python-bugs-list
mailing list