From: Daniel Stenberg Date: Fri, 4 Jul 2025 07:00:29 +0000 (+0200) Subject: test1499: verify two chunked responses on reused connection X-Git-Tag: curl-8_15_0~107 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bed49a0462bee907413a01edd3e12e59b4687d24;p=thirdparty%2Fcurl.git test1499: verify two chunked responses on reused connection It triggered a memory leak back in 7.88.1 Closes #17815 --- diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index f5f83f2b46..18cf6c0365 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -196,8 +196,7 @@ test1460 test1461 test1462 test1463 test1464 test1465 test1466 test1467 \ test1468 test1469 test1470 test1471 test1472 test1473 test1474 test1475 \ test1476 test1477 test1478 test1479 test1480 test1481 test1482 test1483 \ test1484 test1485 test1486 test1487 test1488 test1489 test1490 test1491 \ -test1492 test1493 test1494 test1495 test1496 test1497 test1498 \ -\ +test1492 test1493 test1494 test1495 test1496 test1497 test1498 test1499 \ test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \ test1508 test1509 test1510 test1511 test1512 test1513 test1514 test1515 \ test1516 test1517 test1518 test1519 test1520 test1521 test1522 test1523 \ diff --git a/tests/data/test1499 b/tests/data/test1499 new file mode 100644 index 0000000000..262e9b7aaf --- /dev/null +++ b/tests/data/test1499 @@ -0,0 +1,76 @@ + + + +HTTP +HTTP GET +chunked Transfer-Encoding + + +# +# Server-side + + +HTTP/1.1 200 funky chunky! +Server: fakeit/0.9 fakeitbad/1.0 +Transfer-Encoding: chunked +Trailer: chunky-trailer +Connection: mooo + +40 +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +30 +bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +21;heresatest=moooo +cccccccccccccccccccccccccccccccc + +0 +chunky-trailer: header data + + + +HTTP/1.1 200 funky chunky! +Server: fakeit/0.9 fakeitbad/1.0 +Transfer-Encoding: chunked +Trailer: chunky-trailer +Connection: mooo + +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccccccc +chunky-trailer: header data + + +writedelay: 10 + + + +# +# Client-side + + +http + + +HTTP chunked encoding and chunked trailer, twice + + +http://%HOSTIP:%HTTPPORT/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER -D log/heads%TESTNUMBER + + + +# +# Verify data after the test has been "shot" + + +GET /%TESTNUMBER HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +User-Agent: curl/%VERSION +Accept: */* + +GET /%TESTNUMBER HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +User-Agent: curl/%VERSION +Accept: */* + + + + +