Kaydet (Commit) d7b147b0 authored tarafından Guido van Rossum's avatar Guido van Rossum

Moshe Zadka writes: When deploying SimpleHTTPServer, I noticed a

problem: it does not encode/decode the urls, which is wrong.
üst ed7f9e24
......@@ -13,6 +13,7 @@ import os
import string
import posixpath
import BaseHTTPServer
import urllib
class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
......@@ -77,7 +78,7 @@ class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
probably be diagnosed.)
"""
path = posixpath.normpath(path)
path = posixpath.normpath(urllib.unquote(path))
words = string.splitfields(path, '/')
words = filter(None, words)
path = os.getcwd()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment