diff options
-rw-r--r-- | mitmproxy/tools/console/flowlist.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mitmproxy/tools/console/flowlist.py b/mitmproxy/tools/console/flowlist.py index 39811ce1..83ad63f3 100644 --- a/mitmproxy/tools/console/flowlist.py +++ b/mitmproxy/tools/console/flowlist.py @@ -338,9 +338,10 @@ class FlowListBox(urwid.ListBox): ) def new_request(self, url, method): - parts = mitmproxy.net.http.url.parse(str(url)) - if not parts: - signals.status_message.send(message="Invalid Url") + try: + parts = mitmproxy.net.http.url.parse(str(url)) + except ValueError as e: + signals.status_message.send(message = "Invalid URL: " + str(e)) return scheme, host, port, path = parts f = self.master.create_request(method, scheme, host, port, path) |