lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP POST |
| 6 | HTTP Digest auth |
| 7 | chunked Transfer-Encoding |
| 8 | </keywords> |
| 9 | </info> |
| 10 | # |
| 11 | # Server-side |
| 12 | <reply> |
| 13 | <data> |
| 14 | HTTP/1.1 100 Continue
|
| 15 | Server: Microsoft-IIS/5.0
|
| 16 | Date: Sun, 03 Apr 2005 14:57:45 GMT
|
| 17 | X-Powered-By: ASP.NET
|
| 18 |
|
| 19 | HTTP/1.1 401 authentication please swsbounce
|
| 20 | Server: Microsoft-IIS/6.0
|
| 21 | WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"
|
| 22 | Content-Type: text/html; charset=iso-8859-1
|
| 23 | Content-Length: 0
|
| 24 |
|
| 25 | </data> |
| 26 | <data1> |
| 27 | HTTP/1.1 200 A OK
|
| 28 | Server: Microsoft-IIS/6.0
|
| 29 | Content-Type: text/html; charset=iso-8859-1
|
| 30 | Content-Length: 3
|
| 31 |
|
| 32 | ok |
| 33 | </data1> |
| 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 | </reply> |
| 54 | |
| 55 | # Client-side |
| 56 | <client> |
| 57 | <server> |
| 58 | http |
| 59 | </server> |
| 60 | <features> |
| 61 | !SSPI |
| 62 | crypto |
| 63 | </features> |
| 64 | # tool is what to use instead of 'curl' |
| 65 | <tool> |
| 66 | lib565 |
| 67 | </tool> |
| 68 | |
| 69 | <name> |
| 70 | send HTTP POST using read callback, chunked transfer-encoding and Digest |
| 71 | </name> |
| 72 | <command> |
| 73 | http://%HOSTIP:%HTTPPORT/565 |
| 74 | </command> |
| 75 | </client> |
| 76 | |
| 77 | # |
| 78 | # Verify data after the test has been "shot" |
| 79 | <verify> |
| 80 | <protocol> |
| 81 | POST /565 HTTP/1.1
|
| 82 | Host: %HOSTIP:%HTTPPORT
|
| 83 | Accept: */*
|
| 84 | Transfer-Encoding: chunked
|
| 85 | Content-Type: application/x-www-form-urlencoded
|
| 86 |
|
| 87 | 0
|
| 88 |
|
| 89 | POST /565 HTTP/1.1
|
| 90 | Host: %HOSTIP:%HTTPPORT
|
| 91 | Authorization: Digest username="foo", realm="testrealm", nonce="1053604144", uri="/565", response="877424f750af047634dbd94f9933217b"
|
| 92 | Accept: */*
|
| 93 | Transfer-Encoding: chunked
|
| 94 | Content-Type: application/x-www-form-urlencoded
|
| 95 | Expect: 100-continue
|
| 96 |
|
| 97 | 3
|
| 98 | one
|
| 99 | 3
|
| 100 | two
|
| 101 | 5
|
| 102 | three
|
| 103 | 1d
|
| 104 | and a final longer crap: four
|
| 105 | 0
|
| 106 |
|
| 107 | </protocol> |
| 108 | </verify> |
| 109 | </testcase> |