mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 08:11:00 +00:00
fix #2651
This commit is contained in:
parent
472d122c12
commit
4d924dcfe2
@ -329,9 +329,9 @@ class ConsoleAddon:
|
|||||||
correct viewier, and fall back to the programs in $PAGER or $EDITOR
|
correct viewier, and fall back to the programs in $PAGER or $EDITOR
|
||||||
if necessary.
|
if necessary.
|
||||||
"""
|
"""
|
||||||
fpart = getattr(f, part)
|
fpart = getattr(f, part, None)
|
||||||
if not fpart:
|
if not fpart:
|
||||||
raise exceptions.CommandError("Could not view part %s." % part)
|
raise exceptions.CommandError("Part must be either request or response, not %s." % part)
|
||||||
t = fpart.headers.get("content-type")
|
t = fpart.headers.get("content-type")
|
||||||
content = fpart.get_content(strict=False)
|
content = fpart.get_content(strict=False)
|
||||||
if not content:
|
if not content:
|
||||||
|
Loading…
Reference in New Issue
Block a user