aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-12-10 17:17:58 +0100
committerMaximilian Hils <git@maximilianhils.com>2016-12-10 17:18:21 +0100
commitb4a1bb44d978757aea7f022b040db1bb10f9e278 (patch)
treec19a9c3f2118f3239990109236c4e2812393d3bb /mitmproxy
parent8df61c927ef0d452310c72d397eb98a8d6df8f73 (diff)
downloadmitmproxy-b4a1bb44d978757aea7f022b040db1bb10f9e278.tar.gz
mitmproxy-b4a1bb44d978757aea7f022b040db1bb10f9e278.tar.bz2
mitmproxy-b4a1bb44d978757aea7f022b040db1bb10f9e278.zip
minor fixes
Diffstat (limited to 'mitmproxy')
-rw-r--r--mitmproxy/net/http/message.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mitmproxy/net/http/message.py b/mitmproxy/net/http/message.py
index 3a243070..d3d6898d 100644
--- a/mitmproxy/net/http/message.py
+++ b/mitmproxy/net/http/message.py
@@ -180,9 +180,10 @@ class Message(serializable.Serializable):
return "utf8"
else:
# We may also want to check for HTML meta tags here at some point.
+ # REGEX_ENCODING = re.compile(rb"""<meta[^>]+charset=['"]?([^'"]+)""")
return "latin-1"
- def get_text(self, strict: bool=True) -> str:
+ def get_text(self, strict: bool=True) -> Optional[str]:
"""
The HTTP message body decoded with both content-encoding header (e.g. gzip)
and content-type header charset.