-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3260 from benoitc/fix-te
don't tolerate wrong te headers
- Loading branch information
Showing
12 changed files
with
54 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
from gunicorn.http.errors import UnsupportedTransferCoding | ||
request = UnsupportedTransferCoding | ||
from gunicorn.http.errors import InvalidHeader | ||
request = InvalidHeader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
from gunicorn.http.errors import UnsupportedTransferCoding | ||
request = UnsupportedTransferCoding | ||
from gunicorn.http.errors import InvalidHeader | ||
request = InvalidHeader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,10 @@ | ||
POST /chunked_cont_h_at_first HTTP/1.1\r\n | ||
POST /chunked HTTP/1.1\r\n | ||
Transfer-Encoding: gzip\r\n | ||
Transfer-Encoding: chunked\r\n | ||
\r\n | ||
5; some; parameters=stuff\r\n | ||
5\r\n | ||
hello\r\n | ||
6 \t;\tblahblah; blah\r\n | ||
6\r\n | ||
world\r\n | ||
0\r\n | ||
\r\n | ||
PUT /chunked_cont_h_at_last HTTP/1.1\r\n | ||
Transfer-Encoding: chunked\r\n | ||
Content-Length: -1\r\n | ||
\r\n | ||
5; some; parameters=stuff\r\n | ||
hello\r\n | ||
6; blahblah; blah\r\n | ||
world\r\n | ||
0\r\n | ||
\r\n | ||
PUT /ignored_after_dangerous_framing HTTP/1.1\r\n | ||
Content-Length: 3\r\n | ||
\r\n | ||
foo\r\n | ||
\r\n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,10 @@ | ||
from gunicorn.config import Config | ||
|
||
cfg = Config() | ||
cfg.set("tolerate_dangerous_framing", True) | ||
|
||
req1 = { | ||
request = { | ||
"method": "POST", | ||
"uri": uri("/chunked_cont_h_at_first"), | ||
"uri": uri("/chunked"), | ||
"version": (1, 1), | ||
"headers": [ | ||
("TRANSFER-ENCODING", "chunked") | ||
('TRANSFER-ENCODING', 'gzip'), | ||
('TRANSFER-ENCODING', 'chunked') | ||
], | ||
"body": b"hello world" | ||
} | ||
|
||
req2 = { | ||
"method": "PUT", | ||
"uri": uri("/chunked_cont_h_at_last"), | ||
"version": (1, 1), | ||
"headers": [ | ||
("TRANSFER-ENCODING", "chunked"), | ||
("CONTENT-LENGTH", "-1"), | ||
], | ||
"body": b"hello world" | ||
} | ||
|
||
request = [req1, req2] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
POST /chunked HTTP/1.1\r\n | ||
Transfer-Encoding: gzip,chunked\r\n | ||
\r\n | ||
5\r\n | ||
hello\r\n | ||
6\r\n | ||
world\r\n | ||
0\r\n | ||
\r\n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
request = { | ||
"method": "POST", | ||
"uri": uri("/chunked"), | ||
"version": (1, 1), | ||
"headers": [ | ||
('TRANSFER-ENCODING', 'gzip,chunked') | ||
|
||
], | ||
"body": b"hello world" | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.