]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
test457: verify --max-filesize with chunked encoding
authorDaniel Stenberg <daniel@haxx.se>
Sat, 23 Sep 2023 09:20:00 +0000 (11:20 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 23 Sep 2023 09:20:25 +0000 (11:20 +0200)
tests/data/Makefile.inc
tests/data/test457 [new file with mode: 0644]

index 95563c7d0fd3aaf10340bfcc99007bfb4a8fbab5..081e344d46cf85b8b6d7333e9fcdddc0096e0525 100644 (file)
@@ -70,10 +70,9 @@ test399 test400 test401 test402 test403 test404 test405 test406 test407 \
 test408 test409 test410 test411 test412 test413 test414 test415 test416 \
 test417 test418 test419 test420 test421 test422 test423 test424 test425 \
 test426 test427 test428 test429 test430 test431 test432 test433 test434 \
-test435 test436 test437 test438 test439 \
-\
-test440 test441 test442 test443 test444 test445 test446 test447 test448 \
-test449 test450 test451 test452 test453 test454 test455 test456 \
+test435 test436 test437 test438 test439 test440 test441 test442 test443 \
+test444 test445 test446 test447 test448 test449 test450 test451 test452 \
+test453 test454 test455 test456 test457 \
 \
 test490 test491 test492 test493 test494 test495 test496 test497 test498 \
 \
diff --git a/tests/data/test457 b/tests/data/test457
new file mode 100644 (file)
index 0000000..77eb9c8
--- /dev/null
@@ -0,0 +1,68 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked Transfer-Encoding
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 funky chunky!
+Server: fakeit/0.9 fakeitbad/1.0
+Transfer-Encoding: chunked
+Connection: mooo
+
+40\r
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r
+30\r
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\r
+21;heresatest=moooo\r
+cccccccccccccccccccccccccccccccc
+\r
+0\r
+\r
+</data>
+<datacheck>
+HTTP/1.1 200 funky chunky!
+Server: fakeit/0.9 fakeitbad/1.0
+Transfer-Encoding: chunked
+Connection: mooo
+
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccccccc
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+chunked Transfer-Encoding with --max-filesize
+</name>
+<command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --max-filesize 143
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+# curl: (63) Exceeded the maximum allowed file size (143)
+<errorcode>
+63
+</errorcode>
+</verify>
+
+</testcase>