mirror of
https://github.com/curl/curl.git
synced 2026-08-06 01:36:13 +03:00
Adrian Schuur added trailer support in the chunked encoding stream. The
trailer is then sent to the normal header callback/stream.
This commit is contained in:
parent
86660c73e5
commit
465e19dbe9
9 changed files with 200 additions and 9 deletions
|
|
@ -33,4 +33,4 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \
|
|||
test237 test238 test239 test243 test245 test246 test247 test248 test249 \
|
||||
test250 test251 test252 test253 test254 test255 test521 test522 test523 \
|
||||
test256 test257 test258 test259 test260 test261 test262 test263 test264 \
|
||||
test265
|
||||
test265 test266
|
||||
|
|
|
|||
76
tests/data/test266
Normal file
76
tests/data/test266
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
<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
|
||||
Trailer: chunky-trailer
|
||||
Connection: mooo
|
||||
|
||||
40
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
30
|
||||
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
21;heresatest=moooo
|
||||
cccccccccccccccccccccccccccccccc
|
||||
|
||||
0
|
||||
chunky-trailer: header data
|
||||
|
||||
</data>
|
||||
<datacheck>
|
||||
HTTP/1.1 200 funky chunky!
|
||||
Server: fakeit/0.9 fakeitbad/1.0
|
||||
Transfer-Encoding: chunked
|
||||
Trailer: chunky-trailer
|
||||
Connection: mooo
|
||||
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccccccc
|
||||
</datacheck>
|
||||
</reply>
|
||||
|
||||
#
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
http
|
||||
</server>
|
||||
<name>
|
||||
HTTP GET with chunked Transfer-Encoding and chunked trailer
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/266 -D log/heads266
|
||||
</command>
|
||||
</client>
|
||||
|
||||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<strip>
|
||||
^User-Agent:.*
|
||||
</strip>
|
||||
<protocol>
|
||||
GET /266 HTTP/1.1
|
||||
Host: 127.0.0.1:%HTTPPORT
|
||||
Accept: */*
|
||||
|
||||
</protocol>
|
||||
<file name="log/heads266">
|
||||
HTTP/1.1 200 funky chunky!
|
||||
Server: fakeit/0.9 fakeitbad/1.0
|
||||
Transfer-Encoding: chunked
|
||||
Trailer: chunky-trailer
|
||||
Connection: mooo
|
||||
|
||||
chunky-trailer: header data
|
||||
</file>
|
||||
</verify>
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue