diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-05-26 08:59:31 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-05-26 08:59:31 +0200 |
commit | bf59af9006849addbffe42e36aecd2ec98c08eae (patch) | |
tree | 4667de32690797e12bdf29d8930fe911902b2ea3 | |
parent | 5d8963fc4099c5fb135d74dc75e6c149ceee80a6 (diff) | |
download | curl-bagder/excess-data.tar.gz |
test346: verify connection closed after "excessive data"bagder/excess-data
-rw-r--r-- | tests/data/Makefile.inc | 2 | ||||
-rw-r--r-- | tests/data/test346 | 67 |
2 files changed, 68 insertions, 1 deletions
diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc index 0633ccb2f..97099b4ca 100644 --- a/tests/data/Makefile.inc +++ b/tests/data/Makefile.inc @@ -58,7 +58,7 @@ test307 test308 test309 test310 test311 test312 test313 test314 test315 \ test316 test317 test318 test319 test320 test321 test322 test323 test324 \ test325 test326 test327 test328 test329 test330 test331 test332 test333 \ test334 test335 test336 test337 test338 test339 test340 test341 test342 \ -test343 test344 test345 \ +test343 test344 test345 test346 \ test350 test351 test352 test353 test354 test355 test356 test357 test358 \ test359 \ test393 test394 test395 \ diff --git a/tests/data/test346 b/tests/data/test346 new file mode 100644 index 000000000..2480085d0 --- /dev/null +++ b/tests/data/test346 @@ -0,0 +1,67 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +</keywords> +</info> + +# +# Server-side +<reply> + +# connection-monitor enabled to verify that the connection is closed +# after the excessive data response +<servercmd> +connection-monitor +</servercmd> +<data> +HTTP/1.1 200 OK +Content-Length: 6 +Funny-head: yesyes + +More data than Content-Length says! +</data> +<datacheck nonewline="yes"> +HTTP/1.1 200 OK +Content-Length: 6 +Funny-head: yesyes + +More d +</datacheck> +</reply> + +# +# Client-side +<client> +<server> +http +</server> +<name> +HTTP with more data returned than Content-Length says +</name> +<command> +http://%HOSTIP:%HTTPPORT/346 http://%HOSTIP:%HTTPPORT/346 +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<strip> +^User-Agent:.* +</strip> +<protocol> +GET /346 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+[DISCONNECT] +GET /346 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+[DISCONNECT] +</protocol> +</verify> +</testcase> |