mercurial/hgweb/protocol.py
changeset 28883 032c4c2f802a
parent 28861 86db5cb55d46
child 29760 5e2365698d44
--- a/mercurial/hgweb/protocol.py	Thu Apr 07 00:05:48 2016 +0000
+++ b/mercurial/hgweb/protocol.py	Wed Apr 06 23:22:12 2016 +0000
@@ -8,7 +8,6 @@
 from __future__ import absolute_import
 
 import cgi
-import urllib
 import zlib
 
 from .common import (
@@ -21,6 +20,9 @@
 )
 stringio = util.stringio
 
+urlerr = util.urlerr
+urlreq = util.urlreq
+
 HGTYPE = 'application/mercurial-0.1'
 HGERRTYPE = 'application/hg-error'
 
@@ -82,8 +84,8 @@
     def _client(self):
         return 'remote:%s:%s:%s' % (
             self.req.env.get('wsgi.url_scheme') or 'http',
-            urllib.quote(self.req.env.get('REMOTE_HOST', '')),
-            urllib.quote(self.req.env.get('REMOTE_USER', '')))
+            urlreq.quote(self.req.env.get('REMOTE_HOST', '')),
+            urlreq.quote(self.req.env.get('REMOTE_USER', '')))
 
 def iscmd(cmd):
     return cmd in wireproto.commands