Ticket #3440: charset_fix.diff

File charset_fix.diff, 839 bytes (added by megaksa, 3 years ago)
Line 
150c50
2<     def __init__(self, request, finished, length, agent, encoding=None):
3---
4>     def __init__(self, request, finished, length, agent, content_type, encoding=None):
564a65
6>         self.content_type = content_type
774c75
8<         if self.encoding:
9---
10>         if self.content_type.startswith('text/') and self.encoding:
11154,155c155,156
12<             cont_type = headers.getRawHeaders(b'content-type')[0].decode()
13<             params = cgi.parse_header(cont_type_header)[1]
14---
15>             cont_type_header = headers.getRawHeaders(b'content-type')[0].decode()
16>             cont_type, params = cgi.parse_header(cont_type_header)
17158c159
18<                 BodyHandler(response.request, finished, body_length, self, encoding)
19---
20>                 BodyHandler(response.request, finished, body_length, self, cont_type, encoding)