Imported Upstream version 7.48.0
[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 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 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 !SSPI
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 Host: remotehost:54321\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 Accept: */*\r
84 Content-Length: 409\r
85 Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce\r
86 \r
87 ------------------------------7c633d5c27ce\r
88 Content-Disposition: form-data; name="name"\r
89 \r
90 daniel\r
91 ------------------------------7c633d5c27ce\r
92 Content-Disposition: form-data; name="tool"\r
93 \r
94 curl\r
95 ------------------------------7c633d5c27ce\r
96 Content-Disposition: form-data; name="file"; filename="test258.txt"\r
97 Content-Type: text/plain\r
98 \r
99 foo-
100 This is a moo-
101 bar
102 \r
103 ------------------------------7c633d5c27ce--\r
104 POST http://remotehost:54321/we/want/258 HTTP/1.1\r
105 Host: remotehost:54321\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 Accept: */*\r
109 Content-Length: 409\r
110 Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce\r
111 \r
112 ------------------------------7c633d5c27ce\r
113 Content-Disposition: form-data; name="name"\r
114 \r
115 daniel\r
116 ------------------------------7c633d5c27ce\r
117 Content-Disposition: form-data; name="tool"\r
118 \r
119 curl\r
120 ------------------------------7c633d5c27ce\r
121 Content-Disposition: form-data; name="file"; filename="test258.txt"\r
122 Content-Type: text/plain\r
123 \r
124 foo-
125 This is a moo-
126 bar
127 \r
128 ------------------------------7c633d5c27ce--\r
129 </protocol>
130 </verify>
131 </testcase>