• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<testcase>
2# Authorization is used to force curl to realize that the server is
3# speaking HTTP 1.0. The request is impossible to satisfy with HTTP 1.0
4# because chunked encoding is unavailable, so the request must fail.
5<info>
6<keywords>
7HTTP
8HTTP PUT
9HTTP Digest auth
10--anyauth
11HTTP/1.0
12chunked Transfer-Encoding
13</keywords>
14</info>
15
16# Server-side
17<reply>
18<data>
19HTTP/1.0 401 Authorization Required swsclose
20Server: testcurl
21WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
22WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
23WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344"
24Content-Type: text/plain
25Content-Length: 0
26Connection: close
27
28</data>
29</reply>
30
31# Client-side
32<client>
33<server>
34http
35</server>
36<features>
37crypto
38</features>
39 <name>
40HTTP chunked PUT to HTTP 1.0 server with authorization
41 </name>
42 <command>
43http://%HOSTIP:%HTTPPORT/1072 -T - -u testuser:testpass --anyauth
44</command>
45<stdin>
46This is data we upload with PUT
47it comes from stdin so MUST be sent
48with chunked encoding
49which is impossible in HTTP/1.0
50</stdin>
51</client>
52
53# Verify data after the test has been "shot"
54<verify>
55<errorcode>
5625
57</errorcode>
58<protocol>
59PUT /1072 HTTP/1.1
60Host: %HOSTIP:%HTTPPORT
61User-Agent: curl/%VERSION
62Accept: */*
63Transfer-Encoding: chunked
64Expect: 100-continue
65
667a
67This is data we upload with PUT
68it comes from stdin so MUST be sent
69with chunked encoding
70which is impossible in HTTP/1.0
71
720
73
74</protocol>
75</verify>
76</testcase>
77