Commit 5900bdf4 authored by Florent Guillaume's avatar Florent Guillaume

Allow encoding of application/xhtml+xml pages according to the charset

specified in the Content-Type header. (Collector #1510)
parent 1eae4629
...@@ -433,7 +433,7 @@ class HTTPResponse(BaseResponse): ...@@ -433,7 +433,7 @@ class HTTPResponse(BaseResponse):
return self.use_HTTP_content_compression return self.use_HTTP_content_compression
def _encode_unicode(self,body, def _encode_unicode(self,body,
charset_re=re.compile(r'text/[0-9a-z]+\s*;\s*' + charset_re=re.compile(r'(?:application|text)/[-+0-9a-z]+\s*;\s*' +
r'charset=([-_0-9a-z]+' + r'charset=([-_0-9a-z]+' +
r')(?:(?:\s*;)|\Z)', r')(?:(?:\s*;)|\Z)',
re.IGNORECASE)): re.IGNORECASE)):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment