2008-08-30 07:42:39 +08:00
|
|
|
<testcase>
|
|
|
|
# Redirection is used to force curl to realize that the server is
|
|
|
|
# speaking HTTP 1.0. The request is impossible to satisfy with HTTP 1.0
|
|
|
|
# because chunked encoding is unavailable, so the request must fail.
|
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
HTTP
|
|
|
|
HTTP PUT
|
|
|
|
HTTP/1.0
|
|
|
|
followlocation
|
|
|
|
chunked Transfer-Encoding
|
|
|
|
</keywords>
|
|
|
|
</info>
|
|
|
|
|
|
|
|
# Server-side
|
|
|
|
<reply>
|
|
|
|
<data>
|
2010-04-01 13:22:37 +08:00
|
|
|
HTTP/1.0 301 Redirect swsclose
|
2008-08-30 07:42:39 +08:00
|
|
|
Server: testcurl
|
|
|
|
Content-Type: text/plain
|
2021-03-13 00:38:26 +08:00
|
|
|
Location: /newlocation/%TESTNUMBER0002
|
2008-08-30 07:42:39 +08:00
|
|
|
Content-Length: 0
|
|
|
|
Connection: close
|
|
|
|
|
|
|
|
</data>
|
|
|
|
</reply>
|
|
|
|
|
|
|
|
# Client-side
|
|
|
|
<client>
|
|
|
|
<server>
|
|
|
|
http
|
|
|
|
</server>
|
|
|
|
<name>
|
|
|
|
HTTP chunked PUT to HTTP 1.0 server with redirect
|
|
|
|
</name>
|
|
|
|
<command>
|
2021-03-13 00:38:26 +08:00
|
|
|
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T - -L
|
2008-08-30 07:42:39 +08:00
|
|
|
</command>
|
|
|
|
<stdin>
|
|
|
|
This is data we upload with PUT
|
|
|
|
it comes from stdin so MUST be sent
|
|
|
|
with chunked encoding
|
|
|
|
which is impossible in HTTP/1.0
|
|
|
|
</stdin>
|
|
|
|
</client>
|
|
|
|
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
|
|
|
<errorcode>
|
|
|
|
25
|
|
|
|
</errorcode>
|
|
|
|
<protocol>
|
2021-03-13 00:38:26 +08:00
|
|
|
PUT /%TESTNUMBER HTTP/1.1
|
2008-08-30 07:42:39 +08:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2020-10-02 19:45:24 +08:00
|
|
|
User-Agent: curl/%VERSION
|
2008-08-30 07:42:39 +08:00
|
|
|
Accept: */*
|
|
|
|
Transfer-Encoding: chunked
|
|
|
|
Expect: 100-continue
|
|
|
|
|
2021-05-04 08:29:40 +08:00
|
|
|
%if hyper
|
|
|
|
7A
|
|
|
|
%else
|
2008-08-30 07:42:39 +08:00
|
|
|
7a
|
2021-05-04 08:29:40 +08:00
|
|
|
%endif
|
2008-08-30 07:42:39 +08:00
|
|
|
This is data we upload with PUT
|
|
|
|
it comes from stdin so MUST be sent
|
|
|
|
with chunked encoding
|
|
|
|
which is impossible in HTTP/1.0
|
2008-09-06 01:58:53 +08:00
|
|
|
|
2008-08-30 07:42:39 +08:00
|
|
|
0
|
|
|
|
|
|
|
|
</protocol>
|
|
|
|
</verify>
|
|
|
|
</testcase>
|