summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeador Inge <meadori@gmail.com>2012-07-21 00:12:04 (GMT)
committerMeador Inge <meadori@gmail.com>2012-07-21 00:12:04 (GMT)
commitda1ffbc4eecb53d21b0a25fda9aa8989cbd7463b (patch)
tree71748f75d3cee72f573eef8ea2cbb4a32cc40a52
parent5e36edbaba5e5472e37223cbd2565deef0487f01 (diff)
downloadcpython-da1ffbc4eecb53d21b0a25fda9aa8989cbd7463b.zip
cpython-da1ffbc4eecb53d21b0a25fda9aa8989cbd7463b.tar.gz
cpython-da1ffbc4eecb53d21b0a25fda9aa8989cbd7463b.tar.bz2
Issue #15409: Replace use of deprecated urllib.request.Request methods in http.cookijar
Patch by Flávio Ribeiro.
-rw-r--r--Lib/http/cookiejar.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/http/cookiejar.py b/Lib/http/cookiejar.py
index a516d73..8f3f6dc 100644
--- a/Lib/http/cookiejar.py
+++ b/Lib/http/cookiejar.py
@@ -625,7 +625,7 @@ def request_path(request):
return path
def request_port(request):
- host = request.get_host()
+ host = request.host
i = host.find(':')
if i >= 0:
port = host[i+1:]
@@ -949,7 +949,7 @@ class DefaultCookiePolicy(CookiePolicy):
return True
def set_ok_verifiability(self, cookie, request):
- if request.is_unverifiable() and is_third_party(request):
+ if request.unverifiable and is_third_party(request):
if cookie.version > 0 and self.strict_rfc2965_unverifiable:
_debug(" third-party RFC 2965 cookie during "
"unverifiable transaction")
@@ -1088,7 +1088,7 @@ class DefaultCookiePolicy(CookiePolicy):
return True
def return_ok_verifiability(self, cookie, request):
- if request.is_unverifiable() and is_third_party(request):
+ if request.unverifiable and is_third_party(request):
if cookie.version > 0 and self.strict_rfc2965_unverifiable:
_debug(" third-party RFC 2965 cookie during unverifiable "
"transaction")
@@ -1100,7 +1100,7 @@ class DefaultCookiePolicy(CookiePolicy):
return True
def return_ok_secure(self, cookie, request):
- if cookie.secure and request.get_type() != "https":
+ if cookie.secure and request.type != "https":
_debug(" secure cookie with non-secure request")
return False
return True