Debian Codegraph @

curl/tests/data/test259

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