xref: /aosp_15_r20/external/curl/tests/data/test258 (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker<testcase>
2*6236dae4SAndroid Build Coastguard Worker<info>
3*6236dae4SAndroid Build Coastguard Worker<keywords>
4*6236dae4SAndroid Build Coastguard WorkerHTTP
5*6236dae4SAndroid Build Coastguard WorkerHTTP FORMPOST
6*6236dae4SAndroid Build Coastguard WorkerHTTP replaced headers
7*6236dae4SAndroid Build Coastguard WorkerHTTP proxy
8*6236dae4SAndroid Build Coastguard WorkerHTTP proxy Digest auth
9*6236dae4SAndroid Build Coastguard Worker--proxy-anyauth
10*6236dae4SAndroid Build Coastguard Worker</keywords>
11*6236dae4SAndroid Build Coastguard Worker
12*6236dae4SAndroid Build Coastguard Worker</info>
13*6236dae4SAndroid Build Coastguard Worker# Server-side
14*6236dae4SAndroid Build Coastguard Worker<reply>
15*6236dae4SAndroid Build Coastguard Worker# The stupid test server doesn't response anything at all until the full
16*6236dae4SAndroid Build Coastguard Worker# request has been sent, and then of course the full POST has already been
17*6236dae4SAndroid Build Coastguard Worker# sent!
18*6236dae4SAndroid Build Coastguard Worker<data>
19*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 407 no, tell me who you are first swsclose
20*6236dae4SAndroid Build Coastguard WorkerDate: Tue, 09 Nov 2010 14:49:00 GMT
21*6236dae4SAndroid Build Coastguard WorkerServer: test-server/fake
22*6236dae4SAndroid Build Coastguard WorkerProxy-Authenticate: Digest realm="many secrets", nonce="911"
23*6236dae4SAndroid Build Coastguard WorkerProxy-Connection: close
24*6236dae4SAndroid Build Coastguard WorkerContent-Length: 0
25*6236dae4SAndroid Build Coastguard Worker
26*6236dae4SAndroid Build Coastguard Worker</data>
27*6236dae4SAndroid Build Coastguard Worker<data1000>
28*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 200 A OK
29*6236dae4SAndroid Build Coastguard WorkerServer: Microsoft-IIS/6.0
30*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/html; charset=iso-8859-1
31*6236dae4SAndroid Build Coastguard WorkerContent-Length: 3
32*6236dae4SAndroid Build Coastguard Worker
33*6236dae4SAndroid Build Coastguard Workerok
34*6236dae4SAndroid Build Coastguard Worker</data1000>
35*6236dae4SAndroid Build Coastguard Worker<datacheck>
36*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 407 no, tell me who you are first swsclose
37*6236dae4SAndroid Build Coastguard WorkerDate: Tue, 09 Nov 2010 14:49:00 GMT
38*6236dae4SAndroid Build Coastguard WorkerServer: test-server/fake
39*6236dae4SAndroid Build Coastguard WorkerProxy-Authenticate: Digest realm="many secrets", nonce="911"
40*6236dae4SAndroid Build Coastguard WorkerProxy-Connection: close
41*6236dae4SAndroid Build Coastguard WorkerContent-Length: 0
42*6236dae4SAndroid Build Coastguard Worker
43*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 200 A OK
44*6236dae4SAndroid Build Coastguard WorkerServer: Microsoft-IIS/6.0
45*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/html; charset=iso-8859-1
46*6236dae4SAndroid Build Coastguard WorkerContent-Length: 3
47*6236dae4SAndroid Build Coastguard Worker
48*6236dae4SAndroid Build Coastguard Workerok
49*6236dae4SAndroid Build Coastguard Worker</datacheck>
50*6236dae4SAndroid Build Coastguard Worker
51*6236dae4SAndroid Build Coastguard Worker</reply>
52*6236dae4SAndroid Build Coastguard Worker
53*6236dae4SAndroid Build Coastguard Worker# Client-side
54*6236dae4SAndroid Build Coastguard Worker<client>
55*6236dae4SAndroid Build Coastguard Worker<server>
56*6236dae4SAndroid Build Coastguard Workerhttp
57*6236dae4SAndroid Build Coastguard Worker</server>
58*6236dae4SAndroid Build Coastguard Worker<features>
59*6236dae4SAndroid Build Coastguard WorkerMime
60*6236dae4SAndroid Build Coastguard Worker!SSPI
61*6236dae4SAndroid Build Coastguard Workercrypto
62*6236dae4SAndroid Build Coastguard Workerproxy
63*6236dae4SAndroid Build Coastguard Worker</features>
64*6236dae4SAndroid Build Coastguard Worker<name>
65*6236dae4SAndroid Build Coastguard WorkerHTTP POST multipart without Expect: header using proxy anyauth (Digest)
66*6236dae4SAndroid Build Coastguard Worker</name>
67*6236dae4SAndroid Build Coastguard Worker<command>
68*6236dae4SAndroid Build Coastguard Worker-x http://%HOSTIP:%HTTPPORT http://remotehost:54321/we/want/%TESTNUMBER -F name=daniel -F tool=curl -F file=@%LOGDIR/test%TESTNUMBER.txt -H "Expect:" -U uuuser:pppassword --proxy-anyauth
69*6236dae4SAndroid Build Coastguard Worker</command>
70*6236dae4SAndroid Build Coastguard Worker# We create this file before the command is invoked!
71*6236dae4SAndroid Build Coastguard Worker<file name="%LOGDIR/test%TESTNUMBER.txt">
72*6236dae4SAndroid Build Coastguard Workerfoo-
73*6236dae4SAndroid Build Coastguard WorkerThis is a moo-
74*6236dae4SAndroid Build Coastguard Workerbar
75*6236dae4SAndroid Build Coastguard Worker</file>
76*6236dae4SAndroid Build Coastguard Worker</client>
77*6236dae4SAndroid Build Coastguard Worker
78*6236dae4SAndroid Build Coastguard Worker# Verify data after the test has been "shot"
79*6236dae4SAndroid Build Coastguard Worker<verify>
80*6236dae4SAndroid Build Coastguard Worker<strip>
81*6236dae4SAndroid Build Coastguard Worker^(Content-Type: multipart/form-data;|------).*
82*6236dae4SAndroid Build Coastguard Worker</strip>
83*6236dae4SAndroid Build Coastguard Worker<protocol>
84*6236dae4SAndroid Build Coastguard WorkerPOST http://remotehost:54321/we/want/%TESTNUMBER HTTP/1.1
85*6236dae4SAndroid Build Coastguard WorkerHost: remotehost:54321
86*6236dae4SAndroid Build Coastguard WorkerUser-Agent: curl/%VERSION
87*6236dae4SAndroid Build Coastguard WorkerAccept: */*
88*6236dae4SAndroid Build Coastguard WorkerProxy-Connection: Keep-Alive
89*6236dae4SAndroid Build Coastguard WorkerContent-Length: 433
90*6236dae4SAndroid Build Coastguard WorkerContent-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce
91*6236dae4SAndroid Build Coastguard Worker
92*6236dae4SAndroid Build Coastguard Worker------------------------------7c633d5c27ce
93*6236dae4SAndroid Build Coastguard WorkerContent-Disposition: form-data; name="name"
94*6236dae4SAndroid Build Coastguard Worker
95*6236dae4SAndroid Build Coastguard Workerdaniel
96*6236dae4SAndroid Build Coastguard Worker------------------------------7c633d5c27ce
97*6236dae4SAndroid Build Coastguard WorkerContent-Disposition: form-data; name="tool"
98*6236dae4SAndroid Build Coastguard Worker
99*6236dae4SAndroid Build Coastguard Workercurl
100*6236dae4SAndroid Build Coastguard Worker------------------------------7c633d5c27ce
101*6236dae4SAndroid Build Coastguard WorkerContent-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt"
102*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/plain
103*6236dae4SAndroid Build Coastguard Worker
104*6236dae4SAndroid Build Coastguard Workerfoo-
105*6236dae4SAndroid Build Coastguard WorkerThis is a moo-
106*6236dae4SAndroid Build Coastguard Workerbar
107*6236dae4SAndroid Build Coastguard Worker
108*6236dae4SAndroid Build Coastguard Worker------------------------------7c633d5c27ce--
109*6236dae4SAndroid Build Coastguard WorkerPOST http://remotehost:54321/we/want/%TESTNUMBER HTTP/1.1
110*6236dae4SAndroid Build Coastguard WorkerHost: remotehost:54321
111*6236dae4SAndroid Build Coastguard WorkerProxy-Authorization: Digest username="uuuser", realm="many secrets", nonce="911", uri="/we/want/%TESTNUMBER", response="2501654ca391f0b5c8c12a1da77e34cd"
112*6236dae4SAndroid Build Coastguard WorkerUser-Agent: curl/%VERSION
113*6236dae4SAndroid Build Coastguard WorkerAccept: */*
114*6236dae4SAndroid Build Coastguard WorkerProxy-Connection: Keep-Alive
115*6236dae4SAndroid Build Coastguard WorkerContent-Length: 433
116*6236dae4SAndroid Build Coastguard WorkerContent-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce
117*6236dae4SAndroid Build Coastguard Worker
118*6236dae4SAndroid Build Coastguard Worker------------------------------7c633d5c27ce
119*6236dae4SAndroid Build Coastguard WorkerContent-Disposition: form-data; name="name"
120*6236dae4SAndroid Build Coastguard Worker
121*6236dae4SAndroid Build Coastguard Workerdaniel
122*6236dae4SAndroid Build Coastguard Worker------------------------------7c633d5c27ce
123*6236dae4SAndroid Build Coastguard WorkerContent-Disposition: form-data; name="tool"
124*6236dae4SAndroid Build Coastguard Worker
125*6236dae4SAndroid Build Coastguard Workercurl
126*6236dae4SAndroid Build Coastguard Worker------------------------------7c633d5c27ce
127*6236dae4SAndroid Build Coastguard WorkerContent-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt"
128*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/plain
129*6236dae4SAndroid Build Coastguard Worker
130*6236dae4SAndroid Build Coastguard Workerfoo-
131*6236dae4SAndroid Build Coastguard WorkerThis is a moo-
132*6236dae4SAndroid Build Coastguard Workerbar
133*6236dae4SAndroid Build Coastguard Worker
134*6236dae4SAndroid Build Coastguard Worker------------------------------7c633d5c27ce--
135*6236dae4SAndroid Build Coastguard Worker</protocol>
136*6236dae4SAndroid Build Coastguard Worker</verify>
137*6236dae4SAndroid Build Coastguard Worker</testcase>
138