diff options
Diffstat (limited to 'mitmproxy/contentviews.py')
-rw-r--r-- | mitmproxy/contentviews.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/mitmproxy/contentviews.py b/mitmproxy/contentviews.py index 08a7e446..373c9514 100644 --- a/mitmproxy/contentviews.py +++ b/mitmproxy/contentviews.py @@ -26,9 +26,8 @@ from PIL.ExifTags import TAGS import html2text import six from netlib.odict import ODict -from netlib import encoding -import netlib.http.headers -from netlib.http import url, multipart +from netlib import encoding, http +from netlib.http import url from netlib.utils import clean_bin, hexdump from . import utils from .exceptions import ContentViewException @@ -122,7 +121,7 @@ class ViewAuto(View): headers = metadata.get("headers", {}) ctype = headers.get("content-type") if data and ctype: - ct = netlib.http.headers.parse_content_type(ctype) if ctype else None + ct = http.parse_content_type(ctype) if ctype else None ct = "%s/%s" % (ct[0], ct[1]) if ct in content_types_map: return content_types_map[ct][0](data, **metadata) @@ -276,7 +275,7 @@ class ViewMultipart(View): def __call__(self, data, **metadata): headers = metadata.get("headers", {}) - v = multipart.decode(headers, data) + v = http.multipart.decode(headers, data) if v: return "Multipart form", self._format(v) |