0d95dec0a15e89efc835e6a7e0653994bac5b2b1
[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 --proxy-anyauth
10 </keywords>
11
12 </info>
13 # Server-side
14 <reply>
15 # The stupid test server doesn't response anything at all until the full
16 # request has been sent, and then of course the full POST has already been
17 # sent!
18 <data>
19 HTTP/1.1 407 no, tell me who you are first swsclose
20 Date: Thu, 09 Nov 2010 14:49:00 GMT
21 Server: test-server/fake
22 Proxy-Authenticate: Digest realm="many secrets", nonce="911"
23 Proxy-Connection: close
24 Content-Length: 0
25
26 </data>
27 <data1000>
28 HTTP/1.1 200 A OK\r
29 Server: Microsoft-IIS/6.0\r
30 Content-Type: text/html; charset=iso-8859-1\r
31 Content-Length: 3\r
32 \r
33 ok
34 </data1000>
35 <datacheck>
36 HTTP/1.1 407 no, tell me who you are first swsclose
37 Date: Thu, 09 Nov 2010 14:49:00 GMT
38 Server: test-server/fake
39 Proxy-Authenticate: Digest realm="many secrets", nonce="911"
40 Proxy-Connection: close
41 Content-Length: 0
42
43 HTTP/1.1 200 A OK\r
44 Server: Microsoft-IIS/6.0\r
45 Content-Type: text/html; charset=iso-8859-1\r
46 Content-Length: 3\r
47 \r
48 ok
49 </datacheck>
50
51 </reply>
52
53 # Client-side
54 <client>
55 <server>
56 http
57 </server>
58 <features>
59 crypto
60 </features>
61  <name>
62 HTTP POST multipart without Expect: header using proxy anyauth (Digest)
63  </name>
64  <command>
65 -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
66 </command>
67 # We create this file before the command is invoked!
68 <file name="log/test258.txt">
69 foo-
70 This is a moo-
71 bar
72 </file>
73 </client>
74
75 # Verify data after the test has been "shot"
76 <verify>
77 <strip>
78 ^(User-Agent:|Content-Type: multipart/form-data;|------).*
79 </strip>
80 <protocol>
81 POST http://remotehost:54321/we/want/258 HTTP/1.1\r
82 User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
83 Host: remotehost:54321\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 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>