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 NTLM auth |
| 7 | connection re-use |
| 8 | </keywords> |
| 9 | </info> |
| 10 | # Server-side |
| 11 | <reply> |
| 12 | <servercmd> |
| 13 | connection-monitor |
| 14 | </servercmd> |
| 15 | |
| 16 | <data> |
| 17 | HTTP/1.1 401 Authentication please!
|
| 18 | Content-Length: 20
|
| 19 | WWW-Authenticate: Digest realm="loonie", nonce="314156592"
|
| 20 | WWW-Authenticate: Basic
|
| 21 |
|
| 22 | Please auth with me |
| 23 | </data> |
| 24 | |
| 25 | <data3> |
| 26 | HTTP/1.1 401 Authentication please!
|
| 27 | Content-Length: 20
|
| 28 | WWW-Authenticate: Digest realm="loonie", nonce="314156592"
|
| 29 | WWW-Authenticate: Basic
|
| 30 |
|
| 31 | Please auth with me |
| 32 | </data3> |
| 33 | |
| 34 | # This is supposed to be returned when the server gets the second |
| 35 | # Authorization: NTLM line passed-in from the client |
| 36 | <data1000> |
| 37 | HTTP/1.1 200 Things are fine in server land
|
| 38 | Server: Microsoft-IIS/5.0
|
| 39 | Content-Length: 4
|
| 40 |
|
| 41 | moo |
| 42 | </data1000> |
| 43 | |
| 44 | <data1003> |
| 45 | HTTP/1.1 200 OK
|
| 46 | Server: Another one/1.0
|
| 47 | Content-Length: 4
|
| 48 |
|
| 49 | boo |
| 50 | </data1003> |
| 51 | |
| 52 | # This is the first reply after the redirection |
| 53 | <data1011> |
| 54 | HTTP/1.1 200 OK
|
| 55 | Server: Microsoft-IIS/5.0
|
| 56 | Content-Type: text/html; charset=iso-8859-1
|
| 57 | Content-Length: 34
|
| 58 |
|
| 59 | This is not the real page either! |
| 60 | </data1011> |
| 61 | |
| 62 | <datacheck> |
| 63 | HTTP/1.1 401 Authentication please!
|
| 64 | Content-Length: 20
|
| 65 | WWW-Authenticate: Digest realm="loonie", nonce="314156592"
|
| 66 | WWW-Authenticate: Basic
|
| 67 |
|
| 68 | HTTP/1.1 200 Things are fine in server land
|
| 69 | Server: Microsoft-IIS/5.0
|
| 70 | Content-Length: 4
|
| 71 |
|
| 72 | moo |
| 73 | </datacheck> |
| 74 | |
| 75 | </reply> |
| 76 | |
| 77 | # Client-side |
| 78 | <client> |
| 79 | <server> |
| 80 | http |
| 81 | </server> |
| 82 | <features> |
| 83 | !SSPI |
| 84 | crypto |
| 85 | </features> |
| 86 | <name> |
| 87 | HTTP with --anyauth and connection re-use |
| 88 | </name> |
| 89 | <command> |
| 90 | http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --anyauth http://%HOSTIP:%HTTPPORT/%TESTNUMBER0003 |
| 91 | </command> |
| 92 | </client> |
| 93 | |
| 94 | # Verify data after the test has been "shot" |
| 95 | <verify> |
| 96 | <protocol> |
| 97 | GET /%TESTNUMBER HTTP/1.1
|
| 98 | Host: %HOSTIP:%HTTPPORT
|
| 99 | User-Agent: curl/%VERSION
|
| 100 | Accept: */*
|
| 101 |
|
| 102 | GET /%TESTNUMBER HTTP/1.1
|
| 103 | Host: %HOSTIP:%HTTPPORT
|
| 104 | Authorization: Digest username="testuser", realm="loonie", nonce="314156592", uri="/%TESTNUMBER", response="986238b7e0077754944c966f56d9bc77"
|
| 105 | User-Agent: curl/%VERSION
|
| 106 | Accept: */*
|
| 107 |
|
| 108 | GET /%TESTNUMBER0003 HTTP/1.1
|
| 109 | Host: %HOSTIP:%HTTPPORT
|
| 110 | User-Agent: curl/%VERSION
|
| 111 | Accept: */*
|
| 112 |
|
| 113 | GET /%TESTNUMBER0003 HTTP/1.1
|
| 114 | Host: %HOSTIP:%HTTPPORT
|
| 115 | Authorization: Digest username="testuser", realm="loonie", nonce="314156592", uri="/%TESTNUMBER0003", response="1c6390a67bac3283a9b023402f3b3540"
|
| 116 | User-Agent: curl/%VERSION
|
| 117 | Accept: */*
|
| 118 |
|
| 119 | [DISCONNECT] |
| 120 | </protocol> |
| 121 | </verify> |
| 122 | </testcase> |