web/request.py
changeset 10603 65ad6980976e
parent 10355 60b8204fcca3
child 10604 d4bf85db41f2
--- a/web/request.py	Mon Sep 14 12:19:48 2015 +0200
+++ b/web/request.py	Tue Sep 22 09:39:30 2015 +0200
@@ -22,16 +22,16 @@
 import time
 import random
 import base64
-import urllib
 from StringIO import StringIO
 from hashlib import sha1 # pylint: disable=E0611
 from Cookie import SimpleCookie
 from calendar import timegm
 from datetime import date, datetime
-from urlparse import urlsplit
 import httplib
 from warnings import warn
 
+from six.moves.urllib.parse import urlsplit, quote as urlquote
+
 from rql.utils import rqlvar_maker
 
 from logilab.common.decorators import cached
@@ -580,7 +580,7 @@
             header.append('filename="%s"' % ascii_filename)
             if unicode_filename is not None:
                 # encoded filename according RFC5987
-                urlquoted_filename = urllib.quote(unicode_filename.encode('utf-8'), '')
+                urlquoted_filename = urlquote(unicode_filename.encode('utf-8'), '')
                 header.append("filename*=utf-8''" + urlquoted_filename)
             self.set_header('content-disposition', ';'.join(header))