xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | # Mostly a duplicate of test168 |
| 3 | <info> |
| 4 | <keywords> |
| 5 | HTTP |
| 6 | HTTP GET |
| 7 | HTTP proxy |
| 8 | HTTP proxy Digest auth |
| 9 | HTTP Digest auth |
| 10 | HTTP auth in URL |
| 11 | </keywords> |
| 12 | </info> |
| 13 | |
| 14 | # Server-side |
| 15 | <reply> |
| 16 | |
| 17 | # this is returned first since we get no proxy-auth |
| 18 | <data> |
| 19 | HTTP/1.1 407 Authorization Required to proxy me my dear swsclose |
| 20 | Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345" |
| 21 | |
| 22 | And you should ignore this data. |
| 23 | </data> |
| 24 | |
| 25 | # then this is returned since we get no server-auth |
| 26 | <data1000> |
| 27 | HTTP/1.1 401 Authorization to the remote host as well swsbounce swsclose |
| 28 | WWW-Authenticate: Digest realm="realmweirdo", nonce="123456" |
| 29 | |
| 30 | you should ignore this data too |
| 31 | </data1000> |
| 32 | |
| 33 | <data1001> |
| 34 | HTTP/1.1 200 OK swsclose |
| 35 | Server: no |
| 36 | Content-Length: 15 |
| 37 | |
| 38 | Nice auth sir! |
| 39 | </data1001> |
| 40 | |
| 41 | <datacheck> |
| 42 | HTTP/1.1 407 Authorization Required to proxy me my dear swsclose |
| 43 | Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345" |
| 44 | |
| 45 | HTTP/1.1 401 Authorization to the remote host as well swsbounce swsclose |
| 46 | WWW-Authenticate: Digest realm="realmweirdo", nonce="123456" |
| 47 | |
| 48 | HTTP/1.1 200 OK swsclose |
| 49 | Server: no |
| 50 | Content-Length: 15 |
| 51 | |
| 52 | Nice auth sir! |
| 53 | </datacheck> |
| 54 | </reply> |
| 55 | |
| 56 | # Client-side |
| 57 | <client> |
| 58 | <server> |
| 59 | http |
| 60 | </server> |
| 61 | <features> |
| 62 | !SSPI |
| 63 | crypto |
| 64 | proxy |
| 65 | </features> |
| 66 | <name> |
| 67 | HTTP with proxy Digest and site Digest with creds in URLs |
| 68 | </name> |
| 69 | <command> |
| 70 | http://digest:alot@data.from.server.requiring.digest.hohoho.com/%TESTNUMBER --proxy http://foo:bar@%HOSTIP:%HTTPPORT --proxy-digest --digest |
| 71 | </command> |
| 72 | </client> |
| 73 | |
| 74 | # Verify data after the test has been "shot" |
| 75 | <verify> |
| 76 | <protocol> |
| 77 | GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1
|
| 78 | Host: data.from.server.requiring.digest.hohoho.com
|
| 79 | User-Agent: curl/%VERSION
|
| 80 | Accept: */*
|
| 81 | Proxy-Connection: Keep-Alive
|
| 82 |
|
| 83 | GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1
|
| 84 | Host: data.from.server.requiring.digest.hohoho.com
|
| 85 | Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/%TESTNUMBER", response="f61609cd8f5bb205ef4e169b2c5626cb"
|
| 86 | User-Agent: curl/%VERSION
|
| 87 | Accept: */*
|
| 88 | Proxy-Connection: Keep-Alive
|
| 89 |
|
| 90 | GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1
|
| 91 | Host: data.from.server.requiring.digest.hohoho.com
|
| 92 | Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/%TESTNUMBER", response="f61609cd8f5bb205ef4e169b2c5626cb"
|
| 93 | Authorization: Digest username="digest", realm="realmweirdo", nonce="123456", uri="/%TESTNUMBER", response="08a2e2e684047f4219a38ddc189ac00c"
|
| 94 | User-Agent: curl/%VERSION
|
| 95 | Accept: */*
|
| 96 | Proxy-Connection: Keep-Alive
|
| 97 |
|
| 98 | </protocol> |
| 99 | </verify> |
| 100 | </testcase> |