xref: /aosp_15_r20/external/curl/tests/data/test335 (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker<testcase>
2*6236dae4SAndroid Build Coastguard Worker# Mostly a duplicate of test168
3*6236dae4SAndroid Build Coastguard Worker<info>
4*6236dae4SAndroid Build Coastguard Worker<keywords>
5*6236dae4SAndroid Build Coastguard WorkerHTTP
6*6236dae4SAndroid Build Coastguard WorkerHTTP GET
7*6236dae4SAndroid Build Coastguard WorkerHTTP proxy
8*6236dae4SAndroid Build Coastguard WorkerHTTP proxy Digest auth
9*6236dae4SAndroid Build Coastguard WorkerHTTP Digest auth
10*6236dae4SAndroid Build Coastguard WorkerHTTP auth in URL
11*6236dae4SAndroid Build Coastguard Worker</keywords>
12*6236dae4SAndroid Build Coastguard Worker</info>
13*6236dae4SAndroid Build Coastguard Worker
14*6236dae4SAndroid Build Coastguard Worker# Server-side
15*6236dae4SAndroid Build Coastguard Worker<reply>
16*6236dae4SAndroid Build Coastguard Worker
17*6236dae4SAndroid Build Coastguard Worker# this is returned first since we get no proxy-auth
18*6236dae4SAndroid Build Coastguard Worker<data>
19*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 407 Authorization Required to proxy me my dear swsclose
20*6236dae4SAndroid Build Coastguard WorkerProxy-Authenticate: Digest realm="weirdorealm", nonce="12345"
21*6236dae4SAndroid Build Coastguard Worker
22*6236dae4SAndroid Build Coastguard WorkerAnd you should ignore this data.
23*6236dae4SAndroid Build Coastguard Worker</data>
24*6236dae4SAndroid Build Coastguard Worker
25*6236dae4SAndroid Build Coastguard Worker# then this is returned since we get no server-auth
26*6236dae4SAndroid Build Coastguard Worker<data1000>
27*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 401 Authorization to the remote host as well swsbounce swsclose
28*6236dae4SAndroid Build Coastguard WorkerWWW-Authenticate: Digest realm="realmweirdo", nonce="123456"
29*6236dae4SAndroid Build Coastguard Worker
30*6236dae4SAndroid Build Coastguard Workeryou should ignore this data too
31*6236dae4SAndroid Build Coastguard Worker</data1000>
32*6236dae4SAndroid Build Coastguard Worker
33*6236dae4SAndroid Build Coastguard Worker<data1001>
34*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 200 OK swsclose
35*6236dae4SAndroid Build Coastguard WorkerServer: no
36*6236dae4SAndroid Build Coastguard WorkerContent-Length: 15
37*6236dae4SAndroid Build Coastguard Worker
38*6236dae4SAndroid Build Coastguard WorkerNice auth sir!
39*6236dae4SAndroid Build Coastguard Worker</data1001>
40*6236dae4SAndroid Build Coastguard Worker
41*6236dae4SAndroid Build Coastguard Worker<datacheck>
42*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 407 Authorization Required to proxy me my dear swsclose
43*6236dae4SAndroid Build Coastguard WorkerProxy-Authenticate: Digest realm="weirdorealm", nonce="12345"
44*6236dae4SAndroid Build Coastguard Worker
45*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 401 Authorization to the remote host as well swsbounce swsclose
46*6236dae4SAndroid Build Coastguard WorkerWWW-Authenticate: Digest realm="realmweirdo", nonce="123456"
47*6236dae4SAndroid Build Coastguard Worker
48*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 200 OK swsclose
49*6236dae4SAndroid Build Coastguard WorkerServer: no
50*6236dae4SAndroid Build Coastguard WorkerContent-Length: 15
51*6236dae4SAndroid Build Coastguard Worker
52*6236dae4SAndroid Build Coastguard WorkerNice auth sir!
53*6236dae4SAndroid Build Coastguard Worker</datacheck>
54*6236dae4SAndroid Build Coastguard Worker</reply>
55*6236dae4SAndroid Build Coastguard Worker
56*6236dae4SAndroid Build Coastguard Worker# Client-side
57*6236dae4SAndroid Build Coastguard Worker<client>
58*6236dae4SAndroid Build Coastguard Worker<server>
59*6236dae4SAndroid Build Coastguard Workerhttp
60*6236dae4SAndroid Build Coastguard Worker</server>
61*6236dae4SAndroid Build Coastguard Worker<features>
62*6236dae4SAndroid Build Coastguard Worker!SSPI
63*6236dae4SAndroid Build Coastguard Workercrypto
64*6236dae4SAndroid Build Coastguard Workerproxy
65*6236dae4SAndroid Build Coastguard Worker</features>
66*6236dae4SAndroid Build Coastguard Worker<name>
67*6236dae4SAndroid Build Coastguard WorkerHTTP with proxy Digest and site Digest with creds in URLs
68*6236dae4SAndroid Build Coastguard Worker</name>
69*6236dae4SAndroid Build Coastguard Worker<command>
70*6236dae4SAndroid Build Coastguard Workerhttp://digest:[email protected]/%TESTNUMBER --proxy http://foo:bar@%HOSTIP:%HTTPPORT --proxy-digest --digest
71*6236dae4SAndroid Build Coastguard Worker</command>
72*6236dae4SAndroid Build Coastguard Worker</client>
73*6236dae4SAndroid Build Coastguard Worker
74*6236dae4SAndroid Build Coastguard Worker# Verify data after the test has been "shot"
75*6236dae4SAndroid Build Coastguard Worker<verify>
76*6236dae4SAndroid Build Coastguard Worker<protocol>
77*6236dae4SAndroid Build Coastguard WorkerGET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1
78*6236dae4SAndroid Build Coastguard WorkerHost: data.from.server.requiring.digest.hohoho.com
79*6236dae4SAndroid Build Coastguard WorkerUser-Agent: curl/%VERSION
80*6236dae4SAndroid Build Coastguard WorkerAccept: */*
81*6236dae4SAndroid Build Coastguard WorkerProxy-Connection: Keep-Alive
82*6236dae4SAndroid Build Coastguard Worker
83*6236dae4SAndroid Build Coastguard WorkerGET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1
84*6236dae4SAndroid Build Coastguard WorkerHost: data.from.server.requiring.digest.hohoho.com
85*6236dae4SAndroid Build Coastguard WorkerProxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/%TESTNUMBER", response="f61609cd8f5bb205ef4e169b2c5626cb"
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 Worker
90*6236dae4SAndroid Build Coastguard WorkerGET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1
91*6236dae4SAndroid Build Coastguard WorkerHost: data.from.server.requiring.digest.hohoho.com
92*6236dae4SAndroid Build Coastguard WorkerProxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/%TESTNUMBER", response="f61609cd8f5bb205ef4e169b2c5626cb"
93*6236dae4SAndroid Build Coastguard WorkerAuthorization: Digest username="digest", realm="realmweirdo", nonce="123456", uri="/%TESTNUMBER", response="08a2e2e684047f4219a38ddc189ac00c"
94*6236dae4SAndroid Build Coastguard WorkerUser-Agent: curl/%VERSION
95*6236dae4SAndroid Build Coastguard WorkerAccept: */*
96*6236dae4SAndroid Build Coastguard WorkerProxy-Connection: Keep-Alive
97*6236dae4SAndroid Build Coastguard Worker
98*6236dae4SAndroid Build Coastguard Worker</protocol>
99*6236dae4SAndroid Build Coastguard Worker</verify>
100*6236dae4SAndroid Build Coastguard Worker</testcase>
101