From 2e5ceb3934a7bc5422c5a3a18daafa1b1af02090 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Sun, 2 Jun 2019 15:16:52 +0200 Subject: 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 --- tests/data/test1429 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/data/test1429') diff --git a/tests/data/test1429 b/tests/data/test1429 index 20b031a1e..b6a66c75f 100644 --- a/tests/data/test1429 +++ b/tests/data/test1429 @@ -9,7 +9,7 @@ HTTP/0.9 -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" -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 ^User-Agent:.* -- cgit v1.2.3