From a42b0957ab31c971a79bfe5542b3017fd834ac49 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 5 Aug 2019 09:45:23 +0200 Subject: http09: disable HTTP/0.9 by default in both tool and library As the plan has been laid out in DEPRECATED. Update docs accordingly and verify in test 1174. Now requires the option to be set to allow HTTP/0.9 responses. Closes #4191 --- tests/data/Makefile.inc | 2 +- tests/data/test1174 | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test1401 | 1 - tests/data/test1402 | 1 - tests/data/test1403 | 1 - tests/data/test1404 | 1 - tests/data/test1420 | 1 - 7 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 tests/data/test1174 (limited to 'tests/data') diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc index 3ed4a03e4..6d19ed3c9 100644 --- a/tests/data/Makefile.inc +++ b/tests/data/Makefile.inc @@ -129,7 +129,7 @@ test1136 test1137 test1138 test1139 test1140 test1141 test1142 test1143 \ test1144 test1145 test1146 test1147 test1148 test1149 test1150 test1151 \ test1152 test1153 test1154 test1155 test1156 test1157 test1158 test1159 \ test1160 test1161 test1162 test1163 test1164 test1165 \ -test1170 test1171 test1172 test1173 \ +test1170 test1171 test1172 test1173 test1174 \ \ test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \ test1208 test1209 test1210 test1211 test1212 test1213 test1214 test1215 \ diff --git a/tests/data/test1174 b/tests/data/test1174 new file mode 100644 index 000000000..b316fde8c --- /dev/null +++ b/tests/data/test1174 @@ -0,0 +1,50 @@ + + + +HTTP +HTTP/0.9 + + + +# +# Server-side + + +-foo- swsclose + + + + + +# +# Client-side + + +http + + +HTTP/0.9 GET response denied by default + + +http://%HOSTIP:%HTTPPORT/1174 + + + +# +# Verify data after the test has been "shot" + + +^User-Agent:.* + + +GET /1174 HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +Accept: */* + + +# unsupported protocol + +1 + + + diff --git a/tests/data/test1401 b/tests/data/test1401 index 647f036f4..ec3b25cc9 100644 --- a/tests/data/test1401 +++ b/tests/data/test1401 @@ -88,7 +88,6 @@ int main(int argc, char *argv[]) curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, slist1); curl_easy_setopt(hnd, CURLOPT_USERAGENT, "MyUA"); curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L); - curl_easy_setopt(hnd, CURLOPT_HTTP09_ALLOWED, 1L); curl_easy_setopt(hnd, CURLOPT_COOKIE, "chocolate=chip"); curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L); curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L); diff --git a/tests/data/test1402 b/tests/data/test1402 index b9f52f2e8..bf7eb7b82 100644 --- a/tests/data/test1402 +++ b/tests/data/test1402 @@ -80,7 +80,6 @@ int main(int argc, char *argv[]) curl_easy_setopt(hnd, CURLOPT_POSTFIELDSIZE_LARGE, (curl_off_t)16); curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped"); curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L); - curl_easy_setopt(hnd, CURLOPT_HTTP09_ALLOWED, 1L); curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L); curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L); diff --git a/tests/data/test1403 b/tests/data/test1403 index db13081b0..731d274b3 100644 --- a/tests/data/test1403 +++ b/tests/data/test1403 @@ -75,7 +75,6 @@ int main(int argc, char *argv[]) curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1403?foo=bar&baz=quux"); curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped"); curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L); - curl_easy_setopt(hnd, CURLOPT_HTTP09_ALLOWED, 1L); curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L); curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L); diff --git a/tests/data/test1404 b/tests/data/test1404 index e976f0b38..d3c66a9d5 100644 --- a/tests/data/test1404 +++ b/tests/data/test1404 @@ -146,7 +146,6 @@ int main(int argc, char *argv[]) curl_easy_setopt(hnd, CURLOPT_MIMEPOST, mime1); curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped"); curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L); - curl_easy_setopt(hnd, CURLOPT_HTTP09_ALLOWED, 1L); curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L); curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L); diff --git a/tests/data/test1420 b/tests/data/test1420 index ebd45ff84..03c4584d5 100644 --- a/tests/data/test1420 +++ b/tests/data/test1420 @@ -66,7 +66,6 @@ int main(int argc, char *argv[]) curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L); curl_easy_setopt(hnd, CURLOPT_URL, "imap://%HOSTIP:%IMAPPORT/1420/;MAILINDEX=1"); curl_easy_setopt(hnd, CURLOPT_USERPWD, "user:secret"); - curl_easy_setopt(hnd, CURLOPT_HTTP09_ALLOWED, 1L); curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L); curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L); -- cgit v1.2.1