aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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.