2018-12-06 17:18:03 +08:00
|
|
|
<testcase>
|
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
HTTP
|
|
|
|
HTTP PUT
|
|
|
|
CURLOPT_HTTPTRAILER_FUNCTION
|
|
|
|
CURLOPT_HTTPTRAILER_DATA
|
|
|
|
</keywords>
|
|
|
|
</info>
|
|
|
|
|
|
|
|
# Server-side
|
|
|
|
<reply>
|
|
|
|
<data nocheck="yes">
|
|
|
|
HTTP/1.0 200 OK swsclose
|
2020-02-28 22:00:03 +08:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2018-12-06 17:18:03 +08:00
|
|
|
Server: test-server/fake
|
|
|
|
</data>
|
|
|
|
</reply>
|
|
|
|
# Client-side
|
|
|
|
<client>
|
|
|
|
<features>
|
2019-10-24 01:29:25 +08:00
|
|
|
http
|
2018-12-06 17:18:03 +08:00
|
|
|
</features>
|
|
|
|
<server>
|
|
|
|
http
|
|
|
|
</server>
|
|
|
|
<name>
|
|
|
|
HTTP PUT with trailers at the end
|
|
|
|
</name>
|
|
|
|
<tool>
|
2021-03-13 00:38:26 +08:00
|
|
|
lib%TESTNUMBER
|
2018-12-06 17:18:03 +08:00
|
|
|
</tool>
|
|
|
|
<command>
|
2021-03-13 00:38:26 +08:00
|
|
|
http://%HOSTIP:%HTTPPORT/bzz/%TESTNUMBER
|
2018-12-06 17:18:03 +08:00
|
|
|
</command>
|
|
|
|
<stdin>
|
|
|
|
more than one byte
|
|
|
|
</stdin>
|
|
|
|
</client>
|
|
|
|
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
|
|
|
<protocol>
|
2021-03-13 00:38:26 +08:00
|
|
|
PUT /bzz/%TESTNUMBER HTTP/1.1
|
2018-12-06 17:18:03 +08:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
|
|
|
Accept: */*
|
|
|
|
Transfer-Encoding: chunked
|
|
|
|
Trailer: my-super-awesome-trailer, my-other-awesome-trailer
|
|
|
|
Expect: 100-continue
|
|
|
|
|
2021-05-04 08:29:40 +08:00
|
|
|
%if hyper
|
|
|
|
E
|
|
|
|
%else
|
2018-12-06 17:18:03 +08:00
|
|
|
e
|
2021-05-04 08:29:40 +08:00
|
|
|
%endif
|
2018-12-06 17:18:03 +08:00
|
|
|
Hello Cloud!
|
|
|
|
|
|
|
|
0
|
|
|
|
my-super-awesome-trailer: trail1
|
|
|
|
my-other-awesome-trailer: trail2
|
|
|
|
|
|
|
|
</protocol>
|
|
|
|
</verify>
|
|
|
|
</testcase>
|