[issue10231] SimpleHTTPRequestHandler directory bugs

2017-11-26 Thread Berker Peksag
Berker Peksag added the comment: Note that the macpath module has been deprecated in Python 3.7 in issue 9850 and it's going to be removed in Python 3.8 (and Python 3.6 is the only Python 3 release that accepts bug fixes at the moment) Perhaps it's not worth to fix the macpath case at all. -

[issue10231] SimpleHTTPRequestHandler directory bugs

2017-11-25 Thread Martin Panter
Martin Panter added the comment: I read in PEP 11 that Mac OS 9 support was dropped in Python 2.4. I agree that eliminating “.” and “..” components makes sense, since that is how they should be handled when resolving relative URLs. But it seems low priority, since this doesn’t happen on curre

[issue10231] SimpleHTTPRequestHandler directory bugs

2017-11-25 Thread Hallvard B Furuseth
Hallvard B Furuseth added the comment: On 26/11/17 04:59, Martin Panter wrote: > That leaves the fourth complaint, which I don’t understand: ‘translate_path() > does not handle initial "."/".." on non-Posix systems’. > > As far as I know, in 2010 (and still in 2017) the only non-Posix system >

[issue10231] SimpleHTTPRequestHandler directory bugs

2017-11-25 Thread Martin Panter
Martin Panter added the comment: The first two bugs ("foo/dir?baz" and "foo/dir?baz/") were solved by Issue 23112. The third (".../foo.html/") was solved by Issue 17324. That leaves the fourth complaint, which I don’t understand: ‘translate_path() does not handle initial "."/".." on non-Posix

[issue10231] SimpleHTTPRequestHandler directory bugs

2010-11-22 Thread Hallvard B Furuseth
Hallvard B Furuseth added the comment: Senthil Kumaran writes: > 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 director

[issue10231] SimpleHTTPRequestHandler directory bugs

2010-11-21 Thread Jeremy Thurgood
Jeremy Thurgood added the comment: On Sun, Nov 21, 2010 at 17:11, Senthil Kumaran wrote: >>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,

[issue10231] SimpleHTTPRequestHandler directory bugs

2010-11-21 Thread Senthil Kumaran
Senthil Kumaran added the comment: On Sun, Nov 21, 2010 at 12:12:08PM +, 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 focu

[issue10231] SimpleHTTPRequestHandler directory bugs

2010-11-21 Thread Jeremy Thurgood
Jeremy Thurgood added the comment: On Sun, Nov 21, 2010 at 10:37, Senthil Kumaran wrote: > Now, what happens when you type "http://bugs.python.org?10231"; [1] in > your browser? According to this bug report, the server should 301 > redirect it to "http://bugs.python.org/?10231";. If you try thi

[issue10231] SimpleHTTPRequestHandler directory bugs

2010-11-21 Thread Senthil Kumaran
Senthil Kumaran added the comment: On Sat, Nov 20, 2010 at 07:09:58PM +, Jeremy Thurgood wrote: > There are two separate things here: the URL and the filesystem path. > The bug is that the fragment and query parameters are stripped in > translate_path(), but are *not* stripped when manipula

[issue10231] SimpleHTTPRequestHandler directory bugs

2010-11-20 Thread Jeremy Thurgood
Jeremy Thurgood added the comment: Updated patch as per previous comment. -- Added file: http://bugs.python.org/file19701/issue10231_v2.diff ___ Python tracker ___ _

[issue10231] SimpleHTTPRequestHandler directory bugs

2010-11-20 Thread Jeremy Thurgood
Jeremy Thurgood added the comment: Thanks for the comments. There are two separate things here: the URL and the filesystem path. The only part of the URL we care about is the path section, but the fragment ("#anchor") and query parameters ("?foo") are valid -- SimpleHTTPRequestHandler just i

[issue10231] SimpleHTTPRequestHandler directory bugs

2010-11-20 Thread Senthil Kumaran
Senthil Kumaran 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

[issue10231] SimpleHTTPRequestHandler directory bugs

2010-11-20 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: -> orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue10231] SimpleHTTPRequestHandler directory bugs

2010-11-20 Thread Jeremy Thurgood
Jeremy Thurgood added the comment: Attached a patch to test for and fix the first two issues described in this ticket. Basically, it modifies SimpleHTTPRequestHandler.send_head() to operate on a path already stripped of the query string and fragment rather than the completely unparsed URL.

[issue10231] SimpleHTTPRequestHandler directory bugs

2010-11-04 Thread Hallvard B Furuseth
Changes by Hallvard B Furuseth : -- versions: +Python 2.7, Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue10231] SimpleHTTPRequestHandler directory bugs

2010-11-04 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue10231] SimpleHTTPRequestHandler directory bugs

2010-10-29 Thread R. David Murray
Changes by R. David Murray : -- nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue10231] SimpleHTTPRequestHandler directory bugs

2010-10-29 Thread Hallvard B Furuseth
New submission from Hallvard B Furuseth : SimpleHTTPRequestHandler directory bugs Running 3.2a3 http/server.py or 2.7 SimpleHTTPServer.py as a script: * Redirection appends "/" to the unparsed URL instead of to the pathname component of the parsed URL: "foo/dir?baz" => "foo/dir?baz/". * The