diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-09-05 20:45:58 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-09-05 20:45:58 +0200 |
commit | 5125c669ccd2db5de5f90c66db61e64f63f3ba4c (patch) | |
tree | 6773ffcaada096f7e02c54665b733c1bad350e98 /libmproxy/web | |
parent | 00561d280ccd4aac06b13b434e0aef4492148cb5 (diff) | |
download | mitmproxy-5125c669ccd2db5de5f90c66db61e64f63f3ba4c.tar.gz mitmproxy-5125c669ccd2db5de5f90c66db61e64f63f3ba4c.tar.bz2 mitmproxy-5125c669ccd2db5de5f90c66db61e64f63f3ba4c.zip |
adjust to new netlib Headers class
Diffstat (limited to 'libmproxy/web')
-rw-r--r-- | libmproxy/web/app.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libmproxy/web/app.py b/libmproxy/web/app.py index d6082ee2..2517e7ad 100644 --- a/libmproxy/web/app.py +++ b/libmproxy/web/app.py @@ -27,8 +27,7 @@ class RequestHandler(tornado.web.RequestHandler): @property def json(self): - if not self.request.headers.get( - "Content-Type").startswith("application/json"): + if not self.request.headers.get("Content-Type").startswith("application/json"): return None return json.loads(self.request.body) @@ -186,12 +185,12 @@ class FlowContent(RequestHandler): if not message.content: raise APIError(400, "No content.") - content_encoding = message.headers.get_first("Content-Encoding", None) + content_encoding = message.headers.get("Content-Encoding", None) if content_encoding: content_encoding = re.sub(r"[^\w]", "", content_encoding) self.set_header("Content-Encoding", content_encoding) - original_cd = message.headers.get_first("Content-Disposition", None) + original_cd = message.headers.get("Content-Disposition", None) filename = None if original_cd: filename = re.search("filename=([\w\" \.\-\(\)]+)", original_cd) |