From 8440616f53056b2330393d1b0740c89a30376c67 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 13 Aug 2018 12:12:14 +0200 Subject: http: fix for tiny "HTTP/0.9" response Deal with tiny "HTTP/0.9" (header-less) responses by checking the status-line early, even before a full "HTTP/" is received to allow detecting 0.9 properly. Test 1266 and 1267 added to verify. Fixes #2420 Closes #2872 --- tests/data/test1267 | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 tests/data/test1267 (limited to 'tests/data/test1267') diff --git a/tests/data/test1267 b/tests/data/test1267 new file mode 100644 index 000000000..8f2a63b78 --- /dev/null +++ b/tests/data/test1267 @@ -0,0 +1,46 @@ + + + +HTTP/0.9 + + + +# +# Server-side + + +HTTPr + + +swsclose + + + +# +# Client-side + + +http + + +HTTP GET with a invalid HTTP/1 response line start + + +http://%HOSTIP:%HTTPPORT/1267 + + + +# +# Verify data after the test has been "shot" + + +^User-Agent:.* + + +GET /1267 HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +Accept: */* + + + + -- cgit v1.2.3