Skip to content

Commit b7d6e4e

Browse files
authored
Update cookiejar.py
1 parent b7e859f commit b7d6e4e

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

Lib/http/cookiejar.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,11 +1069,7 @@ def set_ok_domain(self, cookie, request):
10691069

10701070
def set_ok_port(self, cookie, request):
10711071
if cookie.port_specified:
1072-
req_port = request_port(request)
1073-
if req_port is None:
1074-
req_port = "80"
1075-
else:
1076-
req_port = str(req_port)
1072+
req_port = str(request_port(request))
10771073
for p in cookie.port.split(","):
10781074
try:
10791075
int(p)
@@ -1142,8 +1138,6 @@ def return_ok_expires(self, cookie, request):
11421138
def return_ok_port(self, cookie, request):
11431139
if cookie.port:
11441140
req_port = request_port(request)
1145-
if req_port is None:
1146-
req_port = "80"
11471141
for p in cookie.port.split(","):
11481142
if p == req_port:
11491143
break

0 commit comments

Comments
 (0)