har_extractor: Use items() instead of iteritems()

This commit is contained in:
Shadab Zafar 2016-02-20 20:49:55 +05:30
parent e8611acb76
commit be9329dfd4
1 changed files with 2 additions and 2 deletions

View File

@ -131,7 +131,7 @@ def response(context, flow):
request_http_version = flow.request.http_version
# Cookies are shaped as tuples by MITMProxy.
request_cookies = [{"name": k.strip(), "value": v[0]}
for k, v in (flow.request.get_cookies() or {}).iteritems()]
for k, v in (flow.request.get_cookies() or {}).items()]
request_headers = [{"name": k, "value": v} for k, v in flow.request.headers]
request_headers_size = len(str(flow.request.headers))
request_body_size = len(flow.request.content)
@ -139,7 +139,7 @@ def response(context, flow):
response_http_version = flow.response.http_version
# Cookies are shaped as tuples by MITMProxy.
response_cookies = [{"name": k.strip(), "value": v[0]}
for k, v in (flow.response.get_cookies() or {}).iteritems()]
for k, v in (flow.response.get_cookies() or {}).items()]
response_headers = [{"name": k, "value": v}
for k, v in flow.response.headers]
response_headers_size = len(str(flow.response.headers))