mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
Minor refactor
This commit is contained in:
parent
85bf5e18f6
commit
734a7d8a68
@ -185,8 +185,7 @@ def parse_set_cookie_headers(headers):
|
|||||||
for header in headers:
|
for header in headers:
|
||||||
cookies = parse_set_cookie_header(header)
|
cookies = parse_set_cookie_header(header)
|
||||||
if cookies:
|
if cookies:
|
||||||
for cookie in cookies:
|
for name, value, attrs in cookies:
|
||||||
name, value, attrs = cookie
|
|
||||||
ret.append((name, SetCookie(value, attrs)))
|
ret.append((name, SetCookie(value, attrs)))
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
@ -221,6 +220,8 @@ def parse_set_cookie_header(line):
|
|||||||
|
|
||||||
if cookies:
|
if cookies:
|
||||||
return cookies
|
return cookies
|
||||||
|
else:
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
def format_set_cookie_header(name, value, attrs):
|
def format_set_cookie_header(name, value, attrs):
|
||||||
|
Loading…
Reference in New Issue
Block a user