aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mitmproxy/tools/console/grideditor/base.py3
-rw-r--r--mitmproxy/tools/console/grideditor/editors.py20
2 files changed, 2 insertions, 21 deletions
diff --git a/mitmproxy/tools/console/grideditor/base.py b/mitmproxy/tools/console/grideditor/base.py
index b956e59d..38538449 100644
--- a/mitmproxy/tools/console/grideditor/base.py
+++ b/mitmproxy/tools/console/grideditor/base.py
@@ -309,7 +309,8 @@ class BaseGridEditor(urwid.WidgetWrap):
self.walker = GridWalker(self.value, self)
self.lb = GridListBox(self.walker)
- w = urwid.Frame(self.lb)
+ w = urwid.Frame(self.lb, header=h)
+
super().__init__(w)
signals.footer_help.send(self, helptext="")
self.show_empty_msg()
diff --git a/mitmproxy/tools/console/grideditor/editors.py b/mitmproxy/tools/console/grideditor/editors.py
index 4a38eb78..511e246e 100644
--- a/mitmproxy/tools/console/grideditor/editors.py
+++ b/mitmproxy/tools/console/grideditor/editors.py
@@ -39,7 +39,6 @@ class HeaderEditor(base.FocusEditor):
urwid.Text([("text", "Special keys:\n")])
]
keys = [
- ("U", "add User-Agent header"),
]
text.extend(
common.format_keyvals(keys, key="key", val="text", indent=4)
@@ -48,25 +47,6 @@ class HeaderEditor(base.FocusEditor):
text.extend(h)
return text
- def set_user_agent(self, k):
- ua = user_agents.get_by_shortcut(k)
- if ua:
- self.walker.add_value(
- [
- b"User-Agent",
- ua[2].encode()
- ]
- )
-
- def handle_key(self, key):
- if key == "U":
- signals.status_prompt_onekey.send(
- prompt="Add User-Agent header:",
- keys=[(i[0], i[1]) for i in user_agents.UASTRINGS],
- callback=self.set_user_agent,
- )
- return True
-
class RequestHeaderEditor(HeaderEditor):
title = "Edit Request Headers"