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 | </keywords> |
| 8 | </info> |
| 9 | # Server-side |
| 10 | <reply> |
| 11 | <data> |
| 12 | HTTP/1.1 401 Authorization Required swsclose
|
| 13 | WWW-Authenticate: Digest realm="testrealm", nonce="1"
|
| 14 | Content-Length: 26
|
| 15 |
|
| 16 | This is not the real page |
| 17 | </data> |
| 18 | |
| 19 | # This is supposed to be returned when the server gets a |
| 20 | # Authorization: Digest line passed-in from the client |
| 21 | <data1000> |
| 22 | HTTP/1.1 200 OK swsclose
|
| 23 | Content-Length: 23
|
| 24 |
|
| 25 | This IS the real page! |
| 26 | </data1000> |
| 27 | |
| 28 | <datacheck> |
| 29 | HTTP/1.1 401 Authorization Required swsclose
|
| 30 | WWW-Authenticate: Digest realm="testrealm", nonce="1"
|
| 31 | Content-Length: 26
|
| 32 |
|
| 33 | HTTP/1.1 200 OK swsclose
|
| 34 | Content-Length: 23
|
| 35 |
|
| 36 | This IS the real page! |
| 37 | </datacheck> |
| 38 | |
| 39 | </reply> |
| 40 | |
| 41 | # Client-side |
| 42 | <client> |
| 43 | <server> |
| 44 | http |
| 45 | </server> |
| 46 | <features> |
| 47 | !SSPI |
| 48 | crypto |
| 49 | </features> |
| 50 | <name> |
| 51 | HTTP with digest auth and URI contains query |
| 52 | </name> |
| 53 | <command> |
| 54 | "http://%HOSTIP:%HTTPPORT/%TESTNUMBER?query" -u testuser:testpass --digest |
| 55 | </command> |
| 56 | </client> |
| 57 | |
| 58 | # Verify data after the test has been "shot" |
| 59 | <verify> |
| 60 | <protocol> |
| 61 | GET /%TESTNUMBER?query HTTP/1.1
|
| 62 | Host: %HOSTIP:%HTTPPORT
|
| 63 | User-Agent: curl/%VERSION
|
| 64 | Accept: */*
|
| 65 |
|
| 66 | GET /%TESTNUMBER?query HTTP/1.1
|
| 67 | Host: %HOSTIP:%HTTPPORT
|
| 68 | Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/%TESTNUMBER?query", response="5758bd3bbde7f33236e6ccd278eb59af"
|
| 69 | User-Agent: curl/%VERSION
|
| 70 | Accept: */*
|
| 71 |
|
| 72 | </protocol> |
| 73 | </verify> |
| 74 | </testcase> |