mirror of
https://github.com/curl/curl.git
synced 2026-07-22 21:47:16 +03:00
http: don't parse body-related headers bodyless responses
Responses with status codes 1xx, 204 or 304 don't have a response body. For these, don't parse these headers: - Content-Encoding - Content-Length - Content-Range - Last-Modified - Transfer-Encoding This change ensures that HTTP/2 upgrades work even if a "Content-Length: 0" or a "Transfer-Encoding: chunked" header is present. Co-authored-by: Daniel Stenberg Closes #3702 Fixes #3968 Closes #3977
This commit is contained in:
parent
7e590b3ecd
commit
2e5ceb3934
3 changed files with 13 additions and 13 deletions
|
|
@ -9,7 +9,7 @@ HTTP/0.9
|
|||
|
||||
<reply>
|
||||
<data nocheck="yes">
|
||||
HTTP/1.1 1234 OK
|
||||
HTTP/1.1 2345 OK
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake
|
||||
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
|
||||
|
|
@ -43,7 +43,7 @@ http://%HOSTIP:%HTTPPORT/1429 --write-out '%{response_code}' --http0.9
|
|||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<stdout nonewline="yes">
|
||||
HTTP/1.1 1234 OK
|
||||
HTTP/1.1 2345 OK
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake
|
||||
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
|
||||
|
|
@ -55,7 +55,7 @@ Content-Type: text/html
|
|||
Funny-head: yesyes
|
||||
|
||||
-foo-
|
||||
123
|
||||
234
|
||||
</stdout>
|
||||
<strip>
|
||||
^User-Agent:.*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue