quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

test1100 (2755B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP POST
      6 HTTP NTLM auth
      7 </keywords>
      8 </info>
      9 # Server-side
     10 <reply>
     11 
     12 <data>
     13 HTTP/1.1 200 Thanks for this! swsclose
     14 Content-Length: 25
     15 
     16 This is the final page !
     17 </data>
     18 
     19 <data1001>
     20 HTTP/1.1 401 Now gimme that second request of crap
     21 Server: Microsoft-IIS/5.0
     22 Content-Type: text/html; charset=iso-8859-1
     23 Content-Length: 34
     24 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
     25 
     26 This is not the real page either!
     27 </data1001>
     28 
     29 # This is supposed to be returned when the server gets the second
     30 # Authorization: NTLM line passed-in from the client
     31 <data1002>
     32 HTTP/1.1 302 Thanks for this, but we want to redir you!
     33 Server: Microsoft-IIS/5.0
     34 Content-Type: text/html; charset=iso-8859-1
     35 Location: /%TESTNUMBER
     36 Content-Length: 34
     37 
     38 This is not the real page either!
     39 </data1002>
     40 
     41 <datacheck>
     42 HTTP/1.1 401 Now gimme that second request of crap
     43 Server: Microsoft-IIS/5.0
     44 Content-Type: text/html; charset=iso-8859-1
     45 Content-Length: 34
     46 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
     47 
     48 HTTP/1.1 302 Thanks for this, but we want to redir you!
     49 Server: Microsoft-IIS/5.0
     50 Content-Type: text/html; charset=iso-8859-1
     51 Location: /%TESTNUMBER
     52 Content-Length: 34
     53 
     54 HTTP/1.1 200 Thanks for this! swsclose
     55 Content-Length: 25
     56 
     57 This is the final page !
     58 </datacheck>
     59 
     60 </reply>
     61 
     62 # Client-side
     63 <client>
     64 <features>
     65 NTLM
     66 SSL
     67 !SSPI
     68 Debug
     69 </features>
     70 <server>
     71 http
     72 </server>
     73 <name>
     74 HTTP POST with NTLM authorization and following a 302 redirect
     75 </name>
     76 <command>
     77 http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --ntlm -L -d "stuff to send away"
     78 </command>
     79 </client>
     80 
     81 # Verify data after the test has been "shot"
     82 <verify>
     83 POST /%TESTNUMBER HTTP/1.1
     84 Host: %HOSTIP:%HTTPPORT
     85 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
     86 User-Agent: curl/%VERSION
     87 Accept: */*
     88 Content-Length: 0
     89 Content-Type: application/x-www-form-urlencoded
     90 
     91 POST /%TESTNUMBER HTTP/1.1
     92 Host: %HOSTIP:%HTTPPORT
     93 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
     94 User-Agent: curl/%VERSION
     95 Accept: */*
     96 Content-Length: 18
     97 Content-Type: application/x-www-form-urlencoded
     98 
     99 stuff to send awayGET /%TESTNUMBER HTTP/1.1
    100 Host: %HOSTIP:%HTTPPORT
    101 User-Agent: curl/%VERSION
    102 Accept: */*
    103 
    104 </verify>
    105 </testcase>