From: Daniel Stenberg Date: Sat, 23 Sep 2023 09:20:00 +0000 (+0200) Subject: test457: verify --max-filesize with chunked encoding X-Git-Tag: curl-8_4_0~147 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1bf2797ba2fda07089064b6e1a70da054ec70c0e;p=thirdparty%2Fcurl.git test457: verify --max-filesize with chunked encoding --- diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc index 95563c7d0f..081e344d46 100644 --- a/tests/data/Makefile.inc +++ b/tests/data/Makefile.inc @@ -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 index 0000000000..77eb9c8553 --- /dev/null +++ b/tests/data/test457 @@ -0,0 +1,68 @@ + + + +HTTP +HTTP GET +chunked Transfer-Encoding + + +# +# Server-side + + +HTTP/1.1 200 funky chunky! +Server: fakeit/0.9 fakeitbad/1.0 +Transfer-Encoding: chunked +Connection: mooo + +40 +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +30 +bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +21;heresatest=moooo +cccccccccccccccccccccccccccccccc + +0 + + + +HTTP/1.1 200 funky chunky! +Server: fakeit/0.9 fakeitbad/1.0 +Transfer-Encoding: chunked +Connection: mooo + +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccccccc + + + +# +# Client-side + + +http + + +chunked Transfer-Encoding with --max-filesize + + +http://%HOSTIP:%HTTPPORT/%TESTNUMBER --max-filesize 143 + + + +# +# Verify data after the test has been "shot" + + +GET /%TESTNUMBER HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +User-Agent: curl/%VERSION +Accept: */* + + +# curl: (63) Exceeded the maximum allowed file size (143) + +63 + + + +