xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP PUT |
| 6 | HTTP NTLM auth |
| 7 | NTLM |
| 8 | </keywords> |
| 9 | </info> |
| 10 | |
| 11 | # Server-side |
| 12 | <reply> |
| 13 | <servercmd> |
| 14 | auth_required |
| 15 | </servercmd> |
| 16 | <data> |
| 17 | HTTP/1.1 401 NTLM Authorization Required swsclose
|
| 18 | Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
| 19 | WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
|
| 20 | WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
|
| 21 | WWW-Authenticate: NTLM
|
| 22 | Content-Type: text/html; charset=iso-8859-1
|
| 23 | Connection: close
|
| 24 |
|
| 25 | moo |
| 26 | </data> |
| 27 | |
| 28 | # This is supposed to be returned when the server gets a first |
| 29 | # Authorization: NTLM line passed-in from the client |
| 30 | <data1001> |
| 31 | HTTP/1.1 401 Type-1 received, send back type-2
|
| 32 | Server: Microsoft-IIS/5.0
|
| 33 | Content-Length: 34
|
| 34 | Content-Type: text/html; charset=iso-8859-1
|
| 35 | WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
|
| 36 |
|
| 37 | This is not the real page either! |
| 38 | </data1001> |
| 39 | |
| 40 | # This is supposed to be returned when the server gets the second |
| 41 | # Authorization: NTLM line passed-in from the client |
| 42 | <data1002> |
| 43 | HTTP/1.1 200 Type-3 Received and all Things are fine swsclose
|
| 44 | Server: Microsoft-IIS/5.0
|
| 45 | Content-Type: text/html; charset=iso-8859-1
|
| 46 | Content-Length: 32
|
| 47 |
|
| 48 | Finally, this is the real page! |
| 49 | </data1002> |
| 50 | |
| 51 | <datacheck> |
| 52 | HTTP/1.1 401 NTLM Authorization Required swsclose
|
| 53 | Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
| 54 | WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
|
| 55 | WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
|
| 56 | WWW-Authenticate: NTLM
|
| 57 | Content-Type: text/html; charset=iso-8859-1
|
| 58 | Connection: close
|
| 59 |
|
| 60 | HTTP/1.1 401 Type-1 received, send back type-2
|
| 61 | Server: Microsoft-IIS/5.0
|
| 62 | Content-Length: 34
|
| 63 | Content-Type: text/html; charset=iso-8859-1
|
| 64 | WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
|
| 65 |
|
| 66 | HTTP/1.1 200 Type-3 Received and all Things are fine swsclose
|
| 67 | Server: Microsoft-IIS/5.0
|
| 68 | Content-Type: text/html; charset=iso-8859-1
|
| 69 | Content-Length: 32
|
| 70 |
|
| 71 | Finally, this is the real page! |
| 72 | </datacheck> |
| 73 | |
| 74 | </reply> |
| 75 | |
| 76 | # Client-side |
| 77 | <client> |
| 78 | <features> |
| 79 | NTLM |
| 80 | SSL |
| 81 | !SSPI |
| 82 | </features> |
| 83 | <server> |
| 84 | http |
| 85 | </server> |
| 86 | <name> |
| 87 | HTTP PUT with --anyauth authorization (picking NTLM) |
| 88 | </name> |
| 89 | <command> |
| 90 | http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T log/put%TESTNUMBER -u testuser:testpass --anyauth |
| 91 | </command> |
| 92 | <file name="log/put%TESTNUMBER"> |
| 93 | This is data we upload with PUT |
| 94 | a second line |
| 95 | line three |
| 96 | four is the number of lines |
| 97 | </file> |
| 98 | </client> |
| 99 | |
| 100 | # Verify data after the test has been "shot" |
| 101 | <verify> |
| 102 | <protocol> |
| 103 | PUT /%TESTNUMBER HTTP/1.1
|
| 104 | Host: %HOSTIP:%HTTPPORT
|
| 105 | User-Agent: curl/%VERSION
|
| 106 | Accept: */*
|
| 107 | Content-Length: 85
|
| 108 | Expect: 100-continue
|
| 109 |
|
| 110 | PUT /%TESTNUMBER HTTP/1.1
|
| 111 | Host: %HOSTIP:%HTTPPORT
|
| 112 | Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
|
| 113 | User-Agent: curl/%VERSION
|
| 114 | Accept: */*
|
| 115 | Content-Length: 0
|
| 116 |
|
| 117 | PUT /%TESTNUMBER HTTP/1.1
|
| 118 | Host: %HOSTIP:%HTTPPORT
|
| 119 | Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
|
| 120 | User-Agent: curl/%VERSION
|
| 121 | Accept: */*
|
| 122 | Content-Length: 85
|
| 123 | Expect: 100-continue
|
| 124 |
|
| 125 | This is data we upload with PUT |
| 126 | a second line |
| 127 | line three |
| 128 | four is the number of lines |
| 129 | </protocol> |
| 130 | </verify> |
| 131 | </testcase> |