aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-02-07 12:07:18 +1300
committerAldo Cortesi <aldo@nullcube.com>2012-02-07 12:07:18 +1300
commit56d2f9fbdbbd5992a8a1af9383936a49ef0fa8e3 (patch)
tree944ae20945a3f93c19de8670c91e6c21c45eacc4
parenta98d287e2673275501bf8a3a8593c7b267abbc81 (diff)
downloadmitmproxy-56d2f9fbdbbd5992a8a1af9383936a49ef0fa8e3.tar.gz
mitmproxy-56d2f9fbdbbd5992a8a1af9383936a49ef0fa8e3.tar.bz2
mitmproxy-56d2f9fbdbbd5992a8a1af9383936a49ef0fa8e3.zip
Restore header edit functionality.
-rw-r--r--libmproxy/console.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/libmproxy/console.py b/libmproxy/console.py
index 8be74352..9f24c3ab 100644
--- a/libmproxy/console.py
+++ b/libmproxy/console.py
@@ -283,7 +283,7 @@ class KVEditor(WWrap):
[
(
"fixed",
- maxk + 2,
+ maxk + 2,
urwid.AttrWrap(urwid.Edit(edit_text=k, wrap="any"), "editfield"),
),
urwid.AttrWrap(urwid.Edit(edit_text=v, wrap="any"), "editfield"),
@@ -520,12 +520,11 @@ class ConnectionView(WWrap):
c = self._spawn_editor(conn.content or "")
conn.content = c.rstrip("\n")
elif part == "h":
- self.master.view_kveditor("Editing headers", conn.headers.lst, None)
- #headertext = self._spawn_editor(repr(conn.headers))
- #headers = flow.Headers()
- #fp = cStringIO.StringIO(headertext)
- #headers.read(fp)
- #conn.headers = headers
+ headertext = self._spawn_editor(repr(conn.headers))
+ headers = flow.Headers()
+ fp = cStringIO.StringIO(headertext)
+ headers.read(fp)
+ conn.headers = headers
elif part == "u" and self.state.view_flow_mode == VIEW_FLOW_REQUEST:
self.master.prompt_edit("URL", conn.get_url(), self.set_url)
elif part == "m" and self.state.view_flow_mode == VIEW_FLOW_REQUEST: