| 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 NTLM auth | 
 | 7 | NTLM | 
 | 8 | </keywords> | 
 | 9 | </info> | 
 | 10 | # Server-side | 
 | 11 | <reply> | 
 | 12 |  | 
 | 13 | <!-- no <data> in this test since we have NTLM from the start | 
 | 14 |  | 
 | 15 | This is supposed to be returned when the server gets a first | 
 | 16 | Authorization: NTLM line passed-in from the client --> | 
 | 17 |  | 
 | 18 | <data1001> | 
 | 19 | HTTP/1.1 401 Now gimme that second request of crap
 | 
 | 20 | Server: Microsoft-IIS/5.0
 | 
 | 21 | Content-Type: text/html; charset=iso-8859-1
 | 
 | 22 | Content-Length: 34
 | 
 | 23 | WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
 | 
 | 24 | 
 | 
 | 25 | This is not the real page either! | 
 | 26 | </data1001> | 
 | 27 |  | 
 | 28 | # This is supposed to be returned when the server gets the second | 
 | 29 | # Authorization: NTLM line passed-in from the client | 
 | 30 | <data1002> | 
 | 31 | HTTP/1.1 200 Things are fine in server land swsclose
 | 
 | 32 | Server: Microsoft-IIS/5.0
 | 
 | 33 | Content-Type: text/html; charset=iso-8859-1
 | 
 | 34 | Content-Length: 32
 | 
 | 35 | 
 | 
 | 36 | Finally, this is the real page! | 
 | 37 | </data1002> | 
 | 38 |  | 
 | 39 | <datacheck> | 
 | 40 | HTTP/1.1 401 Now gimme that second request of crap
 | 
 | 41 | Server: Microsoft-IIS/5.0
 | 
 | 42 | Content-Type: text/html; charset=iso-8859-1
 | 
 | 43 | Content-Length: 34
 | 
 | 44 | WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
 | 
 | 45 | 
 | 
 | 46 | HTTP/1.1 200 Things are fine in server land swsclose
 | 
 | 47 | Server: Microsoft-IIS/5.0
 | 
 | 48 | Content-Type: text/html; charset=iso-8859-1
 | 
 | 49 | Content-Length: 32
 | 
 | 50 | 
 | 
 | 51 | Finally, this is the real page! | 
 | 52 | </datacheck> | 
 | 53 |  | 
 | 54 | </reply> | 
 | 55 |  | 
 | 56 | # Client-side | 
 | 57 | <client> | 
 | 58 | <features> | 
 | 59 | NTLM | 
 | 60 | SSL | 
 | 61 | !SSPI | 
 | 62 | </features> | 
 | 63 | <server> | 
 | 64 | http | 
 | 65 | </server> | 
 | 66 | <name> | 
 | 67 | HTTP POST with NTLM authorization and added custom headers | 
 | 68 | </name> | 
 | 69 | <command> | 
 | 70 | http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --ntlm -d "data" -H "Header1: yes" -H "Header2: no" | 
 | 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 | Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
 | 
 | 80 | User-Agent: curl/%VERSION
 | 
 | 81 | Accept: */*
 | 
 | 82 | Header1: yes
 | 
 | 83 | Header2: no
 | 
 | 84 | Content-Length: 0
 | 
 | 85 | Content-Type: application/x-www-form-urlencoded
 | 
 | 86 | 
 | 
 | 87 | POST /%TESTNUMBER HTTP/1.1
 | 
 | 88 | Host: %HOSTIP:%HTTPPORT
 | 
 | 89 | Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
 | 
 | 90 | User-Agent: curl/%VERSION
 | 
 | 91 | Accept: */*
 | 
 | 92 | Header1: yes
 | 
 | 93 | Header2: no
 | 
 | 94 | Content-Length: 4
 | 
 | 95 | Content-Type: application/x-www-form-urlencoded
 | 
 | 96 | 
 | 
 | 97 | data | 
 | 98 | </protocol> | 
 | 99 | </verify> | 
 | 100 | </testcase> |