diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-08-26 16:04:50 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-08-26 22:43:38 +0200 |
commit | 5dc594e44f73b1726cabca6a4395323f972e416d (patch) | |
tree | 4621b182953a7f496098cd74d22a4528c56c1ac1 /tests/data | |
parent | 14da6eb4e5d53c803676a78d5d657d0b205f0430 (diff) | |
download | curl-5dc594e44f73b1726cabca6a4395323f972e416d.tar.gz |
http: disallow >3-digit response codes
Make the built-in HTTP parser behave similar to hyper and reject any
HTTP response using more than 3 digits for the response code.
Updated test 1432 accordingly.
Enabled test 1432 in the hyper builds.
Closes #7641
Diffstat (limited to 'tests/data')
-rw-r--r-- | tests/data/DISABLED | 2 | ||||
-rw-r--r-- | tests/data/test1429 | 50 | ||||
-rw-r--r-- | tests/data/test1432 | 3 |
3 files changed, 28 insertions, 27 deletions
diff --git a/tests/data/DISABLED b/tests/data/DISABLED index 09d4118eb..c2e10dd37 100644 --- a/tests/data/DISABLED +++ b/tests/data/DISABLED @@ -90,10 +90,8 @@ 1288 1294 1417 -1429 1430 1431 -1432 1455 1456 1525 diff --git a/tests/data/test1429 b/tests/data/test1429 index 9fc3cd246..2f9dfb931 100644 --- a/tests/data/test1429 +++ b/tests/data/test1429 @@ -9,17 +9,17 @@ HTTP/0.9 <reply> <data nocheck="yes"> -HTTP/1.1 2345 OK -Date: Tue, 09 Nov 2010 14:49:00 GMT -Server: test-server/fake -Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT -ETag: "21025-dc7-39462498" -Accept-Ranges: bytes -Content-Length: 6 -Connection: close -Content-Type: text/html -Funny-head: yesyes - +HTTP/1.1 999 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
-foo- </data> </reply> @@ -32,10 +32,10 @@ http </server> <name> -HTTP GET with 4-digit response code +HTTP GET with 999 response code </name> <command> -http://%HOSTIP:%HTTPPORT/%TESTNUMBER --write-out '%{response_code}' --http0.9 +http://%HOSTIP:%HTTPPORT/%TESTNUMBER --write-out '%{response_code}' </command> </client> @@ -43,19 +43,19 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER --write-out '%{response_code}' --http0.9 # Verify data after the test has been "shot" <verify> <stdout nonewline="yes"> -HTTP/1.1 2345 OK -Date: Tue, 09 Nov 2010 14:49:00 GMT -Server: test-server/fake -Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT -ETag: "21025-dc7-39462498" -Accept-Ranges: bytes -Content-Length: 6 -Connection: close -Content-Type: text/html -Funny-head: yesyes - +HTTP/1.1 999 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
-foo- -234 +999 </stdout> <protocol> GET /%TESTNUMBER HTTP/1.1
diff --git a/tests/data/test1432 b/tests/data/test1432 index ab76e94b0..d134688a3 100644 --- a/tests/data/test1432 +++ b/tests/data/test1432 @@ -48,5 +48,8 @@ User-Agent: curl/%VERSION Accept: */*
</protocol> +<errorcode> +1 +</errorcode> </verify> </testcase> |