Added some <keywords> sections and use some key words more consistently.
[platform/upstream/curl.git] / tests / data / test258
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP FORMPOST
6 HTTP replaced headers
7 HTTP proxy
8 HTTP proxy Digest auth
9 </keywords>
10
11 </info>
12 # Server-side
13 <reply>
14 # The stupid test server doesn't response anything at all until the full
15 # request has been sent, and then of course the full POST has already been
16 # sent!
17 <data>
18 HTTP/1.1 407 no, tell me who you are first swsclose
19 Date: Thu, 09 Nov 2010 14:49:00 GMT
20 Server: test-server/fake
21 Proxy-Authenticate: Digest realm="many secrets", nonce="911"
22 Proxy-Connection: close
23 Content-Length: 0
24
25 </data>
26 <data1000>
27 HTTP/1.1 200 A OK\r
28 Server: Microsoft-IIS/6.0\r
29 Content-Type: text/html; charset=iso-8859-1\r
30 Content-Length: 3\r
31 \r
32 ok
33 </data1000>
34 <datacheck>
35 HTTP/1.1 407 no, tell me who you are first swsclose
36 Date: Thu, 09 Nov 2010 14:49:00 GMT
37 Server: test-server/fake
38 Proxy-Authenticate: Digest realm="many secrets", nonce="911"
39 Proxy-Connection: close
40 Content-Length: 0
41
42 HTTP/1.1 200 A OK\r
43 Server: Microsoft-IIS/6.0\r
44 Content-Type: text/html; charset=iso-8859-1\r
45 Content-Length: 3\r
46 \r
47 ok
48 </datacheck>
49
50 </reply>
51
52 # Client-side
53 <client>
54 <server>
55 http
56 </server>
57 <features>
58 crypto
59 </features>
60  <name>
61 HTTP POST multipart without Expect: header using proxy anyauth (Digest)
62  </name>
63  <command>
64 -x http://%HOSTIP:%HTTPPORT http://remotehost:54321/we/want/258 -F name=daniel -F tool=curl -F file=@log/test258.txt -H "Expect:" -U uuuser:pppassword --proxy-anyauth
65 </command>
66 # We create this file before the command is invoked!
67 <file name="log/test258.txt">
68 foo-
69 This is a moo-
70 bar
71 </file>
72 </client>
73
74 # Verify data after the test has been "shot"
75 <verify>
76 <strip>
77 ^(User-Agent:|Content-Type: multipart/form-data;|------).*
78 </strip>
79 <protocol>
80 POST http://remotehost:54321/we/want/258 HTTP/1.1\r
81 User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
82 Host: remotehost:54321\r
83 Pragma: no-cache\r
84 Accept: */*\r
85 Proxy-Connection: Keep-Alive\r
86 Content-Length: 409\r
87 Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce\r
88 \r
89 ------------------------------7c633d5c27ce\r
90 Content-Disposition: form-data; name="name"\r
91 \r
92 daniel\r
93 ------------------------------7c633d5c27ce\r
94 Content-Disposition: form-data; name="tool"\r
95 \r
96 curl\r
97 ------------------------------7c633d5c27ce\r
98 Content-Disposition: form-data; name="file"; filename="test258.txt"\r
99 Content-Type: text/plain\r
100 \r
101 foo-
102 This is a moo-
103 bar
104 \r
105 ------------------------------7c633d5c27ce--\r
106 POST http://remotehost:54321/we/want/258 HTTP/1.1\r
107 User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
108 Proxy-Authorization: Digest username="uuuser", realm="many secrets", nonce="911", uri="/we/want/258", response="2501654ca391f0b5c8c12a1da77e34cd"\r
109 Host: remotehost:54321\r
110 Pragma: no-cache\r
111 Accept: */*\r
112 Proxy-Connection: Keep-Alive\r
113 Content-Length: 409\r
114 Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce\r
115 \r
116 ------------------------------7c633d5c27ce\r
117 Content-Disposition: form-data; name="name"\r
118 \r
119 daniel\r
120 ------------------------------7c633d5c27ce\r
121 Content-Disposition: form-data; name="tool"\r
122 \r
123 curl\r
124 ------------------------------7c633d5c27ce\r
125 Content-Disposition: form-data; name="file"; filename="test258.txt"\r
126 Content-Type: text/plain\r
127 \r
128 foo-
129 This is a moo-
130 bar
131 \r
132 ------------------------------7c633d5c27ce--\r
133 </protocol>
134 </verify>
135 </testcase>