diff options
Diffstat (limited to 'libmproxy/console')
-rw-r--r-- | libmproxy/console/common.py | 17 | ||||
-rw-r--r-- | libmproxy/console/flowview.py | 5 |
2 files changed, 14 insertions, 8 deletions
diff --git a/libmproxy/console/common.py b/libmproxy/console/common.py index 90bccfe7..5ce2c0b7 100644 --- a/libmproxy/console/common.py +++ b/libmproxy/console/common.py @@ -4,10 +4,13 @@ import urwid import urwid.util import os +from netlib.http.semantics import CONTENT_MISSING +import netlib.utils + from .. import utils -from ..protocol.http import CONTENT_MISSING, decoded +from ..protocol.http import decoded from . import signals -import netlib.utils + try: import pyperclip @@ -135,7 +138,7 @@ def raw_format_flow(f, focus, extended, padding): ) else: req.append(fcol(">>" if focus else " ", "focus")) - + if f["marked"]: req.append(fcol(SYMBOL_MARK, "mark")) @@ -249,7 +252,7 @@ def copy_flow_format_data(part, scope, flow): return None, "Request content is missing" with decoded(flow.request): if part == "h": - data += flow.request.assemble() + data += flow.client_protocol.assemble(flow.request) elif part == "c": data += flow.request.content else: @@ -262,7 +265,7 @@ def copy_flow_format_data(part, scope, flow): return None, "Response content is missing" with decoded(flow.response): if part == "h": - data += flow.response.assemble() + data += flow.client_protocol.assemble(flow.response) elif part == "c": data += flow.response.content else: @@ -295,7 +298,7 @@ def copy_flow(part, scope, flow, master, state): toclip = "" try: toclip = data.decode('utf-8') - except (UnicodeDecodeError): + except (UnicodeDecodeError): toclip = data try: @@ -391,7 +394,7 @@ def format_flow(f, focus, extended=False, hostheader=False, padding=2, err_msg = f.error.msg if f.error else None, resp_code = f.response.code if f.response else None, - + marked = marked, ) if f.response: diff --git a/libmproxy/console/flowview.py b/libmproxy/console/flowview.py index c6c4c10d..1e0f0c17 100644 --- a/libmproxy/console/flowview.py +++ b/libmproxy/console/flowview.py @@ -2,11 +2,14 @@ from __future__ import absolute_import import os import sys import urwid + from netlib import odict +from netlib.http.semantics import CONTENT_MISSING + from . import common, grideditor, contentview, signals, searchable, tabs from . import flowdetailview from .. import utils, controller -from ..protocol.http import HTTPRequest, HTTPResponse, CONTENT_MISSING, decoded +from ..protocol.http import HTTPRequest, HTTPResponse, decoded class SearchError(Exception): |