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 Digest auth |
| 7 | --anyauth |
| 8 | </keywords> |
| 9 | </info> |
| 10 | # Server-side |
| 11 | <reply> |
| 12 | <data> |
| 13 | HTTP/1.1 401 Authorization Required
|
| 14 | Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
| 15 | WWW-Authenticate: Digest realm="testrealm", nonce="1053604199"
|
| 16 | WWW-Authenticate: NTLM
|
| 17 | Content-Type: text/html; charset=iso-8859-1
|
| 18 | Content-Length: 26
|
| 19 |
|
| 20 | This is not the real page |
| 21 | </data> |
| 22 | |
| 23 | # This is supposed to be returned when the server gets a |
| 24 | # Authorization: Digest line passed-in from the client |
| 25 | <data1000> |
| 26 | HTTP/1.1 200 OK
|
| 27 | Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
| 28 | Content-Type: text/html; charset=iso-8859-1
|
| 29 | Content-Length: 23
|
| 30 |
|
| 31 | This IS the real page! |
| 32 | </data1000> |
| 33 | |
| 34 | <datacheck> |
| 35 | HTTP/1.1 401 Authorization Required
|
| 36 | Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
| 37 | WWW-Authenticate: Digest realm="testrealm", nonce="1053604199"
|
| 38 | WWW-Authenticate: NTLM
|
| 39 | Content-Type: text/html; charset=iso-8859-1
|
| 40 | Content-Length: 26
|
| 41 |
|
| 42 | HTTP/1.1 200 OK
|
| 43 | Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
| 44 | Content-Type: text/html; charset=iso-8859-1
|
| 45 | Content-Length: 23
|
| 46 |
|
| 47 | This IS the real page! |
| 48 | </datacheck> |
| 49 | |
| 50 | </reply> |
| 51 | |
| 52 | # Client-side |
| 53 | <client> |
| 54 | <features> |
| 55 | !SSPI |
| 56 | NTLM |
| 57 | </features> |
| 58 | <server> |
| 59 | http |
| 60 | </server> |
| 61 | <name> |
| 62 | HTTP with Digest *OR* NTLM authorization |
| 63 | </name> |
| 64 | <command> |
| 65 | http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --anyauth |
| 66 | </command> |
| 67 | </client> |
| 68 | |
| 69 | # Verify data after the test has been "shot" |
| 70 | <verify> |
| 71 | <protocol> |
| 72 | GET /%TESTNUMBER HTTP/1.1
|
| 73 | Host: %HOSTIP:%HTTPPORT
|
| 74 | User-Agent: curl/%VERSION
|
| 75 | Accept: */*
|
| 76 |
|
| 77 | GET /%TESTNUMBER HTTP/1.1
|
| 78 | Host: %HOSTIP:%HTTPPORT
|
| 79 | Authorization: Digest username="testuser", realm="testrealm", nonce="1053604199", uri="/%TESTNUMBER", response="2c9a6f00af0d86497b177b90e90c688a"
|
| 80 | User-Agent: curl/%VERSION
|
| 81 | Accept: */*
|
| 82 |
|
| 83 | </protocol> |
| 84 | </verify> |
| 85 | </testcase> |