• Home
  • History
  • Annotate
  • 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 must be resent with the correct
4# authorization header, but using HTTP 1.0, not 1.1.
5<info>
6<keywords>
7HTTP
8HTTP PUT
9HTTP Digest auth
10--anyauth
11HTTP/1.0
12</keywords>
13</info>
14
15# Server-side
16<reply>
17<data>
18HTTP/1.0 401 Authorization Required swsclose
19Server: testcurl
20WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
21WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
22WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344"
23Content-Type: text/plain
24Content-Length: 35
25Connection: close
26
27Try again on this HTTP 1.0 server!
28</data>
29
30# This is supposed to be returned when the server gets a
31# Authorization: Digest line passed-in from the client
32<data1000>
33HTTP/1.0 200 OK swsclose
34Server: testcurl
35Content-Type: text/plain
36Content-Length: 23
37Connection: close
38
39This IS the real page!
40</data1000>
41
42<datacheck>
43HTTP/1.0 401 Authorization Required swsclose
44Server: testcurl
45WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
46WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
47WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344"
48Content-Type: text/plain
49Content-Length: 35
50Connection: close
51
52HTTP/1.0 200 OK swsclose
53Server: testcurl
54Content-Type: text/plain
55Content-Length: 23
56Connection: close
57
58This IS the real page!
59</datacheck>
60
61</reply>
62
63# Client-side
64<client>
65<server>
66http
67</server>
68<features>
69!SSPI
70crypto
71</features>
72 <name>
73Downgraded HTTP PUT to HTTP 1.0 with authorization
74 </name>
75 <command>
76http://%HOSTIP:%HTTPPORT/1071 -T log/put1071 -u testuser:testpass --anyauth
77</command>
78<file name="log/put1071">
79This is data we upload with PUT
80a second line
81line three
82four is the number of lines
83</file>
84</client>
85
86# Verify data after the test has been "shot"
87<verify>
88<protocol>
89PUT /1071 HTTP/1.1
90Host: %HOSTIP:%HTTPPORT
91User-Agent: curl/%VERSION
92Accept: */*
93Content-Length: 85
94Expect: 100-continue
95
96This is data we upload with PUT
97a second line
98line three
99four is the number of lines
100PUT /1071 HTTP/1.0
101Host: %HOSTIP:%HTTPPORT
102Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/1071", response="df4cef6b52a30e65d472dd848d2055a1"
103User-Agent: curl/%VERSION
104Accept: */*
105Content-Length: 85
106
107This is data we upload with PUT
108a second line
109line three
110four is the number of lines
111</protocol>
112</verify>
113</testcase>
114