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