tests: add test1598 for POST with trailers

- test POST fields with trailers and chunked encoding

Ref: #12938
Closes #13009
This commit is contained in:
Stefan Eissing 2024-02-28 13:20:59 +01:00 committed by Daniel Stenberg
parent 32e0544dc8
commit 5083809529
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 171 additions and 2 deletions

View file

@ -201,7 +201,7 @@ test1558 test1559 test1560 test1561 test1562 test1563 test1564 test1565 \
test1566 test1567 test1568 test1569 test1570 \
\
test1590 test1591 test1592 test1593 test1594 test1595 test1596 test1597 \
\
test1598 \
test1600 test1601 test1602 test1603 test1604 test1605 test1606 test1607 \
test1608 test1609 test1610 test1611 test1612 test1613 test1614 test1615 \
\

59
tests/data/test1598 Normal file
View file

@ -0,0 +1,59 @@
<testcase>
<info>
<keywords>
HTTP
HTTP POST
CURLOPT_HTTPTRAILER_FUNCTION
CURLOPT_HTTPTRAILER_DATA
</keywords>
</info>
# Server-side
<reply>
<data nocheck="yes">
HTTP/1.0 200 OK swsclose
Date: Tue, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
</data>
</reply>
# Client-side
<client>
<features>
http
</features>
<server>
http
</server>
<name>
HTTP POST with trailers at the end
</name>
<tool>
lib%TESTNUMBER
</tool>
<command>
http://%HOSTIP:%HTTPPORT/bzz/%TESTNUMBER
</command>
<stdin>
more than one byte
</stdin>
</client>
# Verify data after the test has been "shot"
<verify>
<protocol>
POST /bzz/%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Trailer: my-super-awesome-trailer, my-other-awesome-trailer
Transfer-Encoding: chunked
Content-Type: application/x-www-form-urlencoded
11
xxx=yyy&aaa=bbbbb
0
my-super-awesome-trailer: trail1
my-other-awesome-trailer: trail2
</protocol>
</verify>
</testcase>