xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP GET |
| 6 | HTTP proxy |
| 7 | HTTP proxy Basic auth |
| 8 | HTTP Digest auth |
| 9 | </keywords> |
| 10 | </info> |
| 11 | |
| 12 | # Server-side |
| 13 | <reply> |
| 14 | <data> |
| 15 | HTTP/1.1 401 Authorization Required swsclose
|
| 16 | WWW-Authenticate: Digest realm="weirdorealm", nonce="12345"
|
| 17 |
|
| 18 | </data> |
| 19 | |
| 20 | <data1000> |
| 21 | HTTP/1.1 200 OK swsclose
|
| 22 | Server: no |
| 23 | Content-Length: 15 |
| 24 |
|
| 25 | Nice auth sir! |
| 26 | </data1000> |
| 27 | |
| 28 | <datacheck> |
| 29 | HTTP/1.1 401 Authorization Required swsclose
|
| 30 | WWW-Authenticate: Digest realm="weirdorealm", nonce="12345"
|
| 31 |
|
| 32 | HTTP/1.1 200 OK swsclose
|
| 33 | Server: no |
| 34 | Content-Length: 15 |
| 35 |
|
| 36 | Nice auth sir! |
| 37 | </datacheck> |
| 38 | </reply> |
| 39 | |
| 40 | # Client-side |
| 41 | <client> |
| 42 | <server> |
| 43 | http |
| 44 | </server> |
| 45 | <features> |
| 46 | !SSPI |
| 47 | crypto |
| 48 | proxy |
| 49 | </features> |
| 50 | <name> |
| 51 | HTTP with proxy-requiring-Basic to site-requiring-Digest |
| 52 | </name> |
| 53 | <command> |
| 54 | http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --digest --user digest:alot |
| 55 | </command> |
| 56 | </client> |
| 57 | |
| 58 | # Verify data after the test has been "shot" |
| 59 | <verify> |
| 60 | <protocol> |
| 61 | GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1
|
| 62 | Host: data.from.server.requiring.digest.hohoho.com
|
| 63 | Proxy-Authorization: Basic Zm9vOmJhcg==
|
| 64 | User-Agent: curl/%VERSION
|
| 65 | Accept: */*
|
| 66 | Proxy-Connection: Keep-Alive
|
| 67 |
|
| 68 | GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1
|
| 69 | Host: data.from.server.requiring.digest.hohoho.com
|
| 70 | Proxy-Authorization: Basic Zm9vOmJhcg==
|
| 71 | Authorization: Digest username="digest", realm="weirdorealm", nonce="12345", uri="/%TESTNUMBER", response="13c7c02a252cbe1c46d8669898a3be26"
|
| 72 | User-Agent: curl/%VERSION
|
| 73 | Accept: */*
|
| 74 | Proxy-Connection: Keep-Alive
|
| 75 |
|
| 76 | </protocol> |
| 77 | </verify> |
| 78 | </testcase> |