summaryrefslogtreecommitdiff
path: root/Lib/wsgiref/util.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2008-06-18 20:49:58 +0000
committerJeremy Hylton <jeremy@alum.mit.edu>2008-06-18 20:49:58 +0000
commit1afc1696167547a5fa101c53e5a3ab4717f8852c (patch)
treee989e72e71530d892214562785df7e11f84c1111 /Lib/wsgiref/util.py
parenta656d2cd8984f1ecb5a7e2cd09a18f72452f2b78 (diff)
downloadcpython-git-1afc1696167547a5fa101c53e5a3ab4717f8852c.tar.gz
Make a new urllib package .
It consists of code from urllib, urllib2, urlparse, and robotparser. The old modules have all been removed. The new package has five submodules: urllib.parse, urllib.request, urllib.response, urllib.error, and urllib.robotparser. The urllib.request.urlopen() function uses the url opener from urllib2. Note that the unittests have not been renamed for the beta, but they will be renamed in the future. Joint work with Senthil Kumaran.
Diffstat (limited to 'Lib/wsgiref/util.py')
-rw-r--r--Lib/wsgiref/util.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/wsgiref/util.py b/Lib/wsgiref/util.py
index a4ca02f91b..2686b66079 100644
--- a/Lib/wsgiref/util.py
+++ b/Lib/wsgiref/util.py
@@ -50,7 +50,7 @@ def guess_scheme(environ):
def application_uri(environ):
"""Return the application's base URI (no PATH_INFO or QUERY_STRING)"""
url = environ['wsgi.url_scheme']+'://'
- from urllib import quote
+ from urllib.parse import quote
if environ.get('HTTP_HOST'):
url += environ['HTTP_HOST']
@@ -70,7 +70,7 @@ def application_uri(environ):
def request_uri(environ, include_query=1):
"""Return the full request URI, optionally including the query string"""
url = application_uri(environ)
- from urllib import quote
+ from urllib.parse import quote
path_info = quote(environ.get('PATH_INFO',''))
if not environ.get('SCRIPT_NAME'):
url += path_info[1:]