1 | 50c50
|
---|
2 | < def __init__(self, request, finished, length, agent, encoding=None):
|
---|
3 | ---
|
---|
4 | > def __init__(self, request, finished, length, agent, content_type, encoding=None):
|
---|
5 | 64a65
|
---|
6 | > self.content_type = content_type
|
---|
7 | 74c75
|
---|
8 | < if self.encoding:
|
---|
9 | ---
|
---|
10 | > if self.content_type.startswith('text/') and self.encoding:
|
---|
11 | 154,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)
|
---|
17 | 158c159
|
---|
18 | < BodyHandler(response.request, finished, body_length, self, encoding)
|
---|
19 | ---
|
---|
20 | > BodyHandler(response.request, finished, body_length, self, cont_type, encoding)
|
---|