xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | # based on test 64 |
| 3 | |
| 4 | <info> |
| 5 | <keywords> |
| 6 | HTTP |
| 7 | HTTP GET |
| 8 | HTTP Digest auth |
| 9 | </keywords> |
| 10 | </info> |
| 11 | |
| 12 | <reply> |
| 13 | <data> |
| 14 | HTTP/1.1 401 Authorization Required swsclose
|
| 15 | Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
| 16 | WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
|
| 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 swsclose
|
| 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 swsclose
|
| 36 | Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
| 37 | WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
|
| 38 | Content-Type: text/html; charset=iso-8859-1
|
| 39 | Content-Length: 26
|
| 40 |
|
| 41 | HTTP/1.1 200 OK swsclose
|
| 42 | Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
| 43 | Content-Type: text/html; charset=iso-8859-1
|
| 44 | Content-Length: 23
|
| 45 |
|
| 46 | This IS the real page! |
| 47 | </datacheck> |
| 48 | |
| 49 | </reply> |
| 50 | |
| 51 | # Client-side |
| 52 | <client> |
| 53 | <server> |
| 54 | http |
| 55 | </server> |
| 56 | <features> |
| 57 | !SSPI |
| 58 | crypto |
| 59 | </features> |
| 60 | <name> |
| 61 | HTTP with Digest authorization on custom CURLOPT_PORT |
| 62 | </name> |
| 63 | <tool> |
| 64 | lib%TESTNUMBER |
| 65 | </tool> |
| 66 | <command> |
| 67 | http://%HOSTIP/%TESTNUMBER %HTTPPORT |
| 68 | </command> |
| 69 | </client> |
| 70 | |
| 71 | # Verify data after the test has been "shot" |
| 72 | <verify> |
| 73 | <protocol> |
| 74 | GET /%TESTNUMBER HTTP/1.1
|
| 75 | Host: %HOSTIP:%HTTPPORT
|
| 76 | User-Agent: lib%TESTNUMBER
|
| 77 | Accept: */*
|
| 78 |
|
| 79 | GET /%TESTNUMBER HTTP/1.1
|
| 80 | Host: %HOSTIP:%HTTPPORT
|
| 81 | Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/%TESTNUMBER", response="9cbbd857a37e45f2bcad5c7d088191df"
|
| 82 | User-Agent: lib%TESTNUMBER
|
| 83 | Accept: */*
|
| 84 |
|
| 85 | </protocol> |
| 86 | </verify> |
| 87 | </testcase> |