aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/console
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2015-04-14 11:58:10 +1200
committerAldo Cortesi <aldo@nullcube.com>2015-04-14 11:58:10 +1200
commitbea0bd236a60e3e6c80027448e51b7802394304a (patch)
tree1cc160e19eb1834703798503f1818e4278bce1b2 /libmproxy/console
parentf37efecd0a22313eacad33251512ef371557fde7 (diff)
downloadmitmproxy-bea0bd236a60e3e6c80027448e51b7802394304a.tar.gz
mitmproxy-bea0bd236a60e3e6c80027448e51b7802394304a.tar.bz2
mitmproxy-bea0bd236a60e3e6c80027448e51b7802394304a.zip
Housekeeping and cleanups
- No output to stdout on load in examples - they muck up the test suite. - Use the odict module directly, rather than aliasing it. The small convenience this gives to scripters is not worth it. - Move the cookie tests from the flow test module to the protocol_http test module.
Diffstat (limited to 'libmproxy/console')
-rw-r--r--libmproxy/console/contentview.py3
-rw-r--r--libmproxy/console/flowview.py9
2 files changed, 7 insertions, 5 deletions
diff --git a/libmproxy/console/contentview.py b/libmproxy/console/contentview.py
index 12ed5b64..454c992f 100644
--- a/libmproxy/console/contentview.py
+++ b/libmproxy/console/contentview.py
@@ -12,6 +12,7 @@ import traceback
import urwid
import netlib.utils
+from netlib import odict
from . import common
from .. import utils, encoding, flow
@@ -519,7 +520,7 @@ def get_content_view(viewmode, hdrItems, content, limit, logfunc, is_request):
return "No content", ""
msg = []
- hdrs = flow.ODictCaseless([list(i) for i in hdrItems])
+ hdrs = odict.ODictCaseless([list(i) for i in hdrItems])
enc = hdrs.get_first("content-encoding")
if enc and enc != "identity":
diff --git a/libmproxy/console/flowview.py b/libmproxy/console/flowview.py
index 9776f2b1..d7dc0d23 100644
--- a/libmproxy/console/flowview.py
+++ b/libmproxy/console/flowview.py
@@ -1,6 +1,7 @@
from __future__ import absolute_import
import os, sys, copy
import urwid
+from netlib import odict
from . import common, grideditor, contentview, signals, searchable, tabs
from . import flowdetailview
from .. import utils, flow, controller
@@ -275,11 +276,11 @@ class FlowView(tabs.Tabs):
signals.flow_change.send(self, flow = self.flow)
def set_headers(self, lst, conn):
- conn.headers = flow.ODictCaseless(lst)
+ conn.headers = odict.ODictCaseless(lst)
signals.flow_change.send(self, flow = self.flow)
def set_query(self, lst, conn):
- conn.set_query(flow.ODict(lst))
+ conn.set_query(odict.ODict(lst))
signals.flow_change.send(self, flow = self.flow)
def set_path_components(self, lst, conn):
@@ -287,7 +288,7 @@ class FlowView(tabs.Tabs):
signals.flow_change.send(self, flow = self.flow)
def set_form(self, lst, conn):
- conn.set_form_urlencoded(flow.ODict(lst))
+ conn.set_form_urlencoded(odict.ODict(lst))
signals.flow_change.send(self, flow = self.flow)
def edit_form(self, conn):
@@ -311,7 +312,7 @@ class FlowView(tabs.Tabs):
if not self.flow.response:
self.flow.response = HTTPResponse(
self.flow.request.httpversion,
- 200, "OK", flow.ODictCaseless(), ""
+ 200, "OK", odict.ODictCaseless(), ""
)
self.flow.response.reply = controller.DummyReply()
message = self.flow.response