lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP GET |
| 6 | HTTP Basic auth |
| 7 | HTTP NTLM auth |
| 8 | pipelining |
| 9 | flaky |
| 10 | </keywords> |
| 11 | </info> |
| 12 | # Server-side |
| 13 | <reply> |
| 14 | |
| 15 | <!-- Basic auth --> |
| 16 | <data100> |
| 17 | HTTP/1.1 401 Need Basic or NTLM auth
|
| 18 | Server: Microsoft-IIS/5.0
|
| 19 | Content-Type: text/html; charset=iso-8859-1
|
| 20 | Content-Length: 29
|
| 21 | WWW-Authenticate: NTLM
|
| 22 | WWW-Authenticate: Basic realm="testrealm"
|
| 23 |
|
| 24 | This is a bad password page! |
| 25 | </data100> |
| 26 | |
| 27 | <!-- NTLM auth --> |
| 28 | <data200> |
| 29 | HTTP/1.1 401 Need Basic or NTLM auth (2)
|
| 30 | Server: Microsoft-IIS/5.0
|
| 31 | Content-Type: text/html; charset=iso-8859-1
|
| 32 | Content-Length: 27
|
| 33 | WWW-Authenticate: NTLM
|
| 34 | WWW-Authenticate: Basic realm="testrealm"
|
| 35 |
|
| 36 | This is not the real page! |
| 37 | </data200> |
| 38 | |
| 39 | <data1201> |
| 40 | HTTP/1.1 401 NTLM intermediate (2)
|
| 41 | Server: Microsoft-IIS/5.0
|
| 42 | Content-Type: text/html; charset=iso-8859-1
|
| 43 | Content-Length: 33
|
| 44 | WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
|
| 45 |
|
| 46 | This is still not the real page! |
| 47 | </data1201> |
| 48 | |
| 49 | <data1202> |
| 50 | HTTP/1.1 200 Things are fine in server land
|
| 51 | Server: Microsoft-IIS/5.0
|
| 52 | Content-Type: text/html; charset=iso-8859-1
|
| 53 | Content-Length: 32
|
| 54 |
|
| 55 | Finally, this is the real page! |
| 56 | </data1202> |
| 57 | |
| 58 | <datacheck> |
| 59 | HTTP/1.1 401 Need Basic or NTLM auth
|
| 60 | Server: Microsoft-IIS/5.0
|
| 61 | Content-Type: text/html; charset=iso-8859-1
|
| 62 | Content-Length: 29
|
| 63 | WWW-Authenticate: NTLM
|
| 64 | WWW-Authenticate: Basic realm="testrealm"
|
| 65 |
|
| 66 | This is a bad password page! |
| 67 | HTTP/1.1 401 Need Basic or NTLM auth
|
| 68 | Server: Microsoft-IIS/5.0
|
| 69 | Content-Type: text/html; charset=iso-8859-1
|
| 70 | Content-Length: 29
|
| 71 | WWW-Authenticate: NTLM
|
| 72 | WWW-Authenticate: Basic realm="testrealm"
|
| 73 |
|
| 74 | This is a bad password page! |
| 75 | HTTP/1.1 401 NTLM intermediate (2)
|
| 76 | Server: Microsoft-IIS/5.0
|
| 77 | Content-Type: text/html; charset=iso-8859-1
|
| 78 | Content-Length: 33
|
| 79 | WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
|
| 80 |
|
| 81 | HTTP/1.1 200 Things are fine in server land
|
| 82 | Server: Microsoft-IIS/5.0
|
| 83 | Content-Type: text/html; charset=iso-8859-1
|
| 84 | Content-Length: 32
|
| 85 |
|
| 86 | Finally, this is the real page! |
| 87 | </datacheck> |
| 88 | |
| 89 | </reply> |
| 90 | |
| 91 | # Client-side |
| 92 | <client> |
| 93 | <features> |
| 94 | NTLM |
| 95 | !SSPI |
| 96 | </features> |
| 97 | <server> |
| 98 | http |
| 99 | </server> |
| 100 | <tool> |
| 101 | lib2033 |
| 102 | </tool> |
| 103 | |
| 104 | <name> |
| 105 | NTLM connection mapping, pipelining enabled |
| 106 | </name> |
| 107 | <setenv> |
| 108 | # we force our own host name, in order to make the test machine independent |
| 109 | CURL_GETHOSTNAME=curlhost |
| 110 | # we try to use the LD_PRELOAD hack, if not a debug build |
| 111 | LD_PRELOAD=%PWD/libtest/.libs/libhostname.so |
| 112 | </setenv> |
| 113 | <command> |
| 114 | http://%HOSTIP:%HTTPPORT/2032 |
| 115 | </command> |
| 116 | <precheck> |
| 117 | chkhostname curlhost |
| 118 | </precheck> |
| 119 | </client> |
| 120 | |
| 121 | # Verify data after the test has been "shot" |
| 122 | <verify> |
| 123 | <strip> |
| 124 | ^User-Agent:.* |
| 125 | </strip> |
| 126 | <protocol> |
| 127 | GET /20320100 HTTP/1.1
|
| 128 | Host: 127.0.0.1:%HTTPPORT
|
| 129 | Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
|
| 130 | Accept: */*
|
| 131 |
|
| 132 | GET /20320100 HTTP/1.1
|
| 133 | Host: 127.0.0.1:%HTTPPORT
|
| 134 | Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
|
| 135 | Accept: */*
|
| 136 |
|
| 137 | GET /20320200 HTTP/1.1
|
| 138 | Host: 127.0.0.1:%HTTPPORT
|
| 139 | Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
|
| 140 | Accept: */*
|
| 141 |
|
| 142 | GET /20320200 HTTP/1.1
|
| 143 | Host: 127.0.0.1:%HTTPPORT
|
| 144 | Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
|
| 145 | Accept: */*
|
| 146 |
|
| 147 | </protocol> |
| 148 | </verify> |
| 149 | </testcase> |