From 71ae158d7bc1dedb734170ca2f40ee41521b1399 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 30 Aug 2012 12:51:04 +1200 Subject: Display "No Content" instead of a parse error when there is no content. --- libmproxy/console/contentview.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libmproxy') diff --git a/libmproxy/console/contentview.py b/libmproxy/console/contentview.py index e5881b6b..29da6030 100644 --- a/libmproxy/console/contentview.py +++ b/libmproxy/console/contentview.py @@ -357,6 +357,8 @@ def get_content_view(viewmode, hdrItems, content, limit, logfunc): """ Returns a (msg, body) tuple. """ + if not content: + return ("No content", "") msg = [] hdrs = flow.ODictCaseless([list(i) for i in hdrItems]) -- cgit v1.2.3