This commit is contained in:
Sachin Kelkar 2017-03-01 16:52:45 +05:30
parent 99b584ad7d
commit 40943f5618
2 changed files with 2 additions and 5 deletions

View File

@ -65,6 +65,7 @@ def flow_to_json(flow: mitmproxy.flow.Flow) -> dict:
"timestamp_start": flow.request.timestamp_start, "timestamp_start": flow.request.timestamp_start,
"timestamp_end": flow.request.timestamp_end, "timestamp_end": flow.request.timestamp_end,
"is_replay": flow.request.is_replay, "is_replay": flow.request.is_replay,
"pretty_host": flow.request.pretty_host,
} }
if flow.response: if flow.response:
if flow.response.raw_content: if flow.response.raw_content:

View File

@ -54,16 +54,12 @@ export var MessageUtils = {
}; };
export var RequestUtils = _.extend(MessageUtils, { export var RequestUtils = _.extend(MessageUtils, {
pretty_host: function (request) {
//FIXME: Add hostheader
return request.host;
},
pretty_url: function (request) { pretty_url: function (request) {
var port = ""; var port = "";
if (defaultPorts[request.scheme] !== request.port) { if (defaultPorts[request.scheme] !== request.port) {
port = ":" + request.port; port = ":" + request.port;
} }
return request.scheme + "://" + this.pretty_host(request) + port + request.path; return request.scheme + "://" + request.pretty_host + port + request.path;
} }
}); });