summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-01-13 17:05:56 (GMT)
committerGeorg Brandl <georg@python.org>2006-01-13 17:05:56 (GMT)
commit45ab2339351db224062e0047ec88ea19392015b2 (patch)
tree2e89f69549c4fb0f942a5d0aa6c38b9b413adf24
parent4edd989eaf5bae40f9e11424b36b22892c5ba459 (diff)
downloadcpython-45ab2339351db224062e0047ec88ea19392015b2.zip
cpython-45ab2339351db224062e0047ec88ea19392015b2.tar.gz
cpython-45ab2339351db224062e0047ec88ea19392015b2.tar.bz2
Bug #1394565: SimpleHTTPServer now doesn't choke on query paramters
any more.
-rw-r--r--Lib/SimpleHTTPServer.py3
-rw-r--r--Misc/NEWS3
2 files changed, 6 insertions, 0 deletions
diff --git a/Lib/SimpleHTTPServer.py b/Lib/SimpleHTTPServer.py
index eac95ca..ea10fb7 100644
--- a/Lib/SimpleHTTPServer.py
+++ b/Lib/SimpleHTTPServer.py
@@ -14,6 +14,7 @@ import os
import posixpath
import BaseHTTPServer
import urllib
+import urlparse
import cgi
import shutil
import mimetypes
@@ -136,6 +137,8 @@ class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
probably be diagnosed.)
"""
+ # abandon query parameters
+ path = urlparse.urlparse(path)[2]
path = posixpath.normpath(urllib.unquote(path))
words = path.split('/')
words = filter(None, words)
diff --git a/Misc/NEWS b/Misc/NEWS
index a95774f..be768d3 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -335,6 +335,9 @@ Extension Modules
Library
-------
+- Bug #1394565: SimpleHTTPServer now doesn't choke on query paramters
+ any more.
+
- Bug #1403410: The warnings module now doesn't get confused
when it can't find out the module name it generates a warning for.