Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions gunicorn/http/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,6 @@ def set_body_reader(self):
# safe option: nuke it, its never needed
if chunked:
raise InvalidHeader("TRANSFER-ENCODING", req=self)
elif val.lower() in ('compress', 'deflate', 'gzip'):
# chunked should be the last one
if chunked:
raise InvalidHeader("TRANSFER-ENCODING", req=self)
self.force_close()
else:
raise UnsupportedTransferCoding(value)

Expand Down
2 changes: 1 addition & 1 deletion tests/requests/invalid/chunked_06.http
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
POST /chunked_not_last HTTP/1.1\r\n
Transfer-Encoding: chunked\r\n
Transfer-Encoding: gzip\r\n
Transfer-Encoding: identity\r\n
\r\n
5\r\n
hello\r\n
Expand Down
2 changes: 1 addition & 1 deletion tests/requests/valid/025.http
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
POST /chunked HTTP/1.1\r\n
Transfer-Encoding: gzip\r\n
Transfer-Encoding: identity\r\n
Transfer-Encoding: chunked\r\n
\r\n
5\r\n
Expand Down
2 changes: 1 addition & 1 deletion tests/requests/valid/025.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"uri": uri("/chunked"),
"version": (1, 1),
"headers": [
('TRANSFER-ENCODING', 'gzip'),
('TRANSFER-ENCODING', 'identity'),
('TRANSFER-ENCODING', 'chunked')
],
"body": b"hello world"
Expand Down
2 changes: 1 addition & 1 deletion tests/requests/valid/025_line.http
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
POST /chunked HTTP/1.1\r\n
Transfer-Encoding: gzip,chunked\r\n
Transfer-Encoding: identity,chunked\r\n
\r\n
5\r\n
hello\r\n
Expand Down
2 changes: 1 addition & 1 deletion tests/requests/valid/025_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"uri": uri("/chunked"),
"version": (1, 1),
"headers": [
('TRANSFER-ENCODING', 'gzip,chunked')
('TRANSFER-ENCODING', 'identity,chunked')

],
"body": b"hello world"
Expand Down
Loading