diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-09-17 15:16:33 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-09-17 15:16:33 +0200 |
commit | 906360f63f2afb4991dd2b38528798ad4efd0618 (patch) | |
tree | a89f2d2d1a768f85ea604589ade4df85b7c09d22 /examples/har_extractor.py | |
parent | 12984f149cab1308b97b5ae1bdbe375787057e7e (diff) | |
download | mitmproxy-906360f63f2afb4991dd2b38528798ad4efd0618.tar.gz mitmproxy-906360f63f2afb4991dd2b38528798ad4efd0618.tar.bz2 mitmproxy-906360f63f2afb4991dd2b38528798ad4efd0618.zip |
code -> status_code, httpversion -> http_version
Diffstat (limited to 'examples/har_extractor.py')
-rw-r--r-- | examples/har_extractor.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/har_extractor.py b/examples/har_extractor.py index f16f1909..4e905438 100644 --- a/examples/har_extractor.py +++ b/examples/har_extractor.py @@ -128,7 +128,7 @@ def response(context, flow): request_query_string = [{"name": k, "value": v} for k, v in flow.request.get_query()] - request_http_version = flow.request.httpversion + 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()] @@ -136,8 +136,7 @@ def response(context, flow): request_headers_size = len(str(flow.request.headers)) request_body_size = len(flow.request.content) - response_http_version = ".".join( - [str(v) for v in flow.response.httpversion]) + 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()] @@ -165,7 +164,7 @@ def response(context, flow): "bodySize": request_body_size, }, "response": { - "status": flow.response.code, + "status": flow.response.status_code, "statusText": flow.response.msg, "httpVersion": response_http_version, "cookies": response_cookies, |