xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP POST |
| 6 | HTTP Digest auth |
| 7 | </keywords> |
| 8 | </info> |
| 9 | |
| 10 | # Server-side |
| 11 | <reply> |
| 12 | <data> |
| 13 | HTTP/1.1 100 Continue
|
| 14 | Server: Microsoft-IIS/5.0
|
| 15 | Date: Sun, 03 Apr 2005 14:57:45 GMT
|
| 16 | X-Powered-By: ASP.NET
|
| 17 |
|
| 18 | HTTP/1.1 401 authentication please swsbounce
|
| 19 | Server: Microsoft-IIS/6.0
|
| 20 | WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"
|
| 21 | Content-Type: text/html; charset=iso-8859-1
|
| 22 | Content-Length: 0
|
| 23 |
|
| 24 | </data> |
| 25 | <data1000> |
| 26 | HTTP/1.1 200 A OK
|
| 27 | Server: Microsoft-IIS/6.0
|
| 28 | Content-Type: text/html; charset=iso-8859-1
|
| 29 | Content-Length: 3
|
| 30 |
|
| 31 | ok |
| 32 | </data1000> |
| 33 | |
| 34 | <datacheck> |
| 35 | HTTP/1.1 100 Continue
|
| 36 | Server: Microsoft-IIS/5.0
|
| 37 | Date: Sun, 03 Apr 2005 14:57:45 GMT
|
| 38 | X-Powered-By: ASP.NET
|
| 39 |
|
| 40 | HTTP/1.1 401 authentication please swsbounce
|
| 41 | Server: Microsoft-IIS/6.0
|
| 42 | WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"
|
| 43 | Content-Type: text/html; charset=iso-8859-1
|
| 44 | Content-Length: 0
|
| 45 |
|
| 46 | HTTP/1.1 200 A OK
|
| 47 | Server: Microsoft-IIS/6.0
|
| 48 | Content-Type: text/html; charset=iso-8859-1
|
| 49 | Content-Length: 3
|
| 50 |
|
| 51 | ok |
| 52 | </datacheck> |
| 53 | |
| 54 | </reply> |
| 55 | |
| 56 | # Client-side |
| 57 | <client> |
| 58 | # |
| 59 | <server> |
| 60 | http |
| 61 | </server> |
| 62 | <features> |
| 63 | !SSPI |
| 64 | crypto |
| 65 | </features> |
| 66 | <name> |
| 67 | HTTP POST --digest with server doing a 100 before 401 response |
| 68 | </name> |
| 69 | <command> |
| 70 | http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u auser:apasswd --digest -d "junkelijunk" |
| 71 | </command> |
| 72 | </client> |
| 73 | |
| 74 | # Verify data after the test has been "shot" |
| 75 | <verify> |
| 76 | <protocol nonewline="yes"> |
| 77 | POST /%TESTNUMBER HTTP/1.1
|
| 78 | Host: %HOSTIP:%HTTPPORT
|
| 79 | User-Agent: curl/%VERSION
|
| 80 | Accept: */*
|
| 81 | Content-Length: 0
|
| 82 | Content-Type: application/x-www-form-urlencoded
|
| 83 |
|
| 84 | POST /%TESTNUMBER HTTP/1.1
|
| 85 | Host: %HOSTIP:%HTTPPORT
|
| 86 | Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/%TESTNUMBER", response="761e6fc9a760c39d587092e8d840e740"
|
| 87 | User-Agent: curl/%VERSION
|
| 88 | Accept: */*
|
| 89 | Content-Length: 11
|
| 90 | Content-Type: application/x-www-form-urlencoded
|
| 91 |
|
| 92 | junkelijunk |
| 93 | </protocol> |
| 94 | </verify> |
| 95 | </testcase> |