Skip to content

Commit

Permalink
test457: verify --max-filesize with chunked encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
bagder committed Sep 23, 2023
1 parent 914e49b commit 1bf2797
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/data/Makefile.inc
Expand Up @@ -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 \
\
Expand Down
68 changes: 68 additions & 0 deletions tests/data/test457
@@ -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
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
30
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
21;heresatest=moooo
cccccccccccccccccccccccccccccccc

0

</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
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*

</protocol>
# curl: (63) Exceeded the maximum allowed file size (143)
<errorcode>
63
</errorcode>
</verify>

</testcase>

0 comments on commit 1bf2797

Please sign in to comment.