diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-03-21 22:49:51 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-03-21 22:49:51 +0100 |
commit | 02a61ea45dc1ca6d0c88b44adf83f68b791130e7 (patch) | |
tree | 26f44a84ade4e4af892d05096d4609c6fcecb1c3 /web/src/js/flow/utils.js | |
parent | ac5d74d42c0824b5789cc030bf39a447951e4804 (diff) | |
download | mitmproxy-02a61ea45dc1ca6d0c88b44adf83f68b791130e7.tar.gz mitmproxy-02a61ea45dc1ca6d0c88b44adf83f68b791130e7.tar.bz2 mitmproxy-02a61ea45dc1ca6d0c88b44adf83f68b791130e7.zip |
structure components
Diffstat (limited to 'web/src/js/flow/utils.js')
-rw-r--r-- | web/src/js/flow/utils.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/web/src/js/flow/utils.js b/web/src/js/flow/utils.js index a95d4ffe..dd7f763b 100644 --- a/web/src/js/flow/utils.js +++ b/web/src/js/flow/utils.js @@ -1,6 +1,6 @@ var _ = require("lodash"); -var _MessageUtils = { +var MessageUtils = { getContentType: function (message) { return this.get_first_header(message, /^Content-Type$/i); }, @@ -42,7 +42,7 @@ var defaultPorts = { "https": 443 }; -var RequestUtils = _.extend(_MessageUtils, { +var RequestUtils = _.extend(MessageUtils, { pretty_host: function (request) { //FIXME: Add hostheader return request.host; @@ -56,11 +56,11 @@ var RequestUtils = _.extend(_MessageUtils, { } }); -var ResponseUtils = _.extend(_MessageUtils, {}); +var ResponseUtils = _.extend(MessageUtils, {}); module.exports = { ResponseUtils: ResponseUtils, - RequestUtils: RequestUtils - -}
\ No newline at end of file + RequestUtils: RequestUtils, + MessageUtils: MessageUtils +};
\ No newline at end of file |