diff options
author | Thomas Kriechbaumer <Kriechi@users.noreply.github.com> | 2017-02-20 11:48:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-20 11:48:40 +0100 |
commit | 050245e842c5a62650a365dc7484da5e9824fd1a (patch) | |
tree | a1d86812514ce3b0342589c921aa1e04b2d1dd61 /mitmproxy/tools | |
parent | 48cfaf8c39e4810c952816523cefe2c0e94c02f4 (diff) | |
parent | d30ef7ee3eb1bef28fc5bddba72ad6ba0cb54660 (diff) | |
download | mitmproxy-050245e842c5a62650a365dc7484da5e9824fd1a.tar.gz mitmproxy-050245e842c5a62650a365dc7484da5e9824fd1a.tar.bz2 mitmproxy-050245e842c5a62650a365dc7484da5e9824fd1a.zip |
Merge pull request #2017 from lymanZerga11/patch-1
Catch ValueErrors from url.parse()
Diffstat (limited to 'mitmproxy/tools')
-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) |