mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
More old urllib usage.
This commit is contained in:
parent
029986af24
commit
7d84055e25
4 changed files with 19 additions and 19 deletions
|
@ -138,8 +138,8 @@ def load_my_cookie():
|
|||
value = cookies[COOKIE_NAME]
|
||||
except KeyError:
|
||||
return {}
|
||||
import urllib
|
||||
value = urllib.unquote(value)
|
||||
import urllib.parse
|
||||
value = urllib.parse.unquote(value)
|
||||
words = value.split('/')
|
||||
while len(words) < 3:
|
||||
words.append('')
|
||||
|
@ -153,8 +153,8 @@ def load_my_cookie():
|
|||
def send_my_cookie(ui):
|
||||
name = COOKIE_NAME
|
||||
value = "%s/%s/%s" % (ui.author, ui.email, ui.password)
|
||||
import urllib
|
||||
value = urllib.quote(value)
|
||||
import urllib.parse
|
||||
value = urllib.parse.quote(value)
|
||||
then = now + COOKIE_LIFETIME
|
||||
gmt = time.gmtime(then)
|
||||
path = os.environ.get('SCRIPT_NAME', '/cgi-bin/')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue