diff options
author | Daniel Stenberg <daniel@haxx.se> | 2018-08-13 12:12:14 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-08-13 23:16:01 +0200 |
commit | 8440616f53056b2330393d1b0740c89a30376c67 (patch) | |
tree | ea2ea2300488f3c792ff7cf2a86e5047a3814e2f /tests/data/test1267 | |
parent | 233908a55aa041d1ad3d901f9c3b8e3b1ebd3d55 (diff) |
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
Diffstat (limited to 'tests/data/test1267')
-rw-r--r-- | tests/data/test1267 | 46 |
1 files changed, 46 insertions, 0 deletions
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 @@ +<testcase> +<info> +<keywords> +HTTP/0.9 +</keywords> +</info> + +# +# Server-side +<reply> +<data> +HTTPr +</data> +<servercmd> +swsclose +</servercmd> +</reply> + +# +# Client-side +<client> +<server> +http +</server> + <name> +HTTP GET with a invalid HTTP/1 response line start + </name> + <command> +http://%HOSTIP:%HTTPPORT/1267 +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<strip> +^User-Agent:.* +</strip> +<protocol> +GET /1267 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol> +</verify> +</testcase> |