[ python-Bugs-1394565 ] SimpleHTTPServer doesn't understand query arguments

SourceForge.net noreply at sourceforge.net
Thu Jan 5 16:45:24 CET 2006


Bugs item #1394565, was opened at 2005-12-31 15:46
Message generated for change (Comment added) made by aaronsw
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1394565&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Aaron Swartz (aaronsw)
Assigned to: Nobody/Anonymous (nobody)
Summary: SimpleHTTPServer doesn't understand query arguments

Initial Comment:
If you set the SimpleHTTPServer to serve files and visit /filename it works 
but if you visit /filename?f=1 it returns a 404. It should strip off the query 
argument and visit /filename

----------------------------------------------------------------------

>Comment By: Aaron Swartz (aaronsw)
Date: 2006-01-05 09:45

Message:
Logged In: YES 
user_id=122141

The patch is to add this line to the top of SimpleHTTPServer.py's translate_path 
function:

        path = path.split('?')[0]


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1394565&group_id=5470


More information about the Python-bugs-list mailing list