quickjs-tart

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

test3101 (1733B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP Basic auth
      6 </keywords>
      7 </info>
      8 
      9 # Server-side
     10 <reply>
     11 <data>
     12 HTTP/1.1 401 Authorization Required swsbounce
     13 Server: Apache/1.3.27 (Darwin) PHP/4.1.2
     14 WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
     15 WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
     16 Content-Length: 26
     17 Content-Type: text/html; charset=iso-8859-1
     18 
     19 This is not the real page
     20 </data>
     21 
     22 # This is supposed to be returned when the server gets a
     23 # Authorization: Digest line passed-in from the client
     24 <data1>
     25 HTTP/1.1 200 OK
     26 Server: Apache/1.3.27 (Darwin) PHP/4.1.2
     27 Content-Type: text/html; charset=iso-8859-1
     28 Content-Length: 23
     29 Connection: close
     30 
     31 This IS the real page!
     32 </data1>
     33 
     34 <datacheck>
     35 HTTP/1.1 401 Authorization Required swsbounce
     36 Server: Apache/1.3.27 (Darwin) PHP/4.1.2
     37 WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
     38 WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
     39 Content-Length: 26
     40 Content-Type: text/html; charset=iso-8859-1
     41 
     42 HTTP/1.1 200 OK
     43 Server: Apache/1.3.27 (Darwin) PHP/4.1.2
     44 Content-Type: text/html; charset=iso-8859-1
     45 Content-Length: 23
     46 Connection: close
     47 
     48 This IS the real page!
     49 </datacheck>
     50 </reply>
     51 
     52 # Client-Side
     53 <client>
     54 # require https because the code sets that as an acceptable redirect proto
     55 <features>
     56 https
     57 </features>
     58 <server>
     59 http
     60 </server>
     61 <tool>
     62 lib%TESTNUMBER
     63 </tool>
     64 
     65 <name>
     66 HTTP auth without redirection protocols
     67 </name>
     68 <command>
     69 http://%HOSTIP:%HTTPPORT/%TESTNUMBER
     70 </command>
     71 </client>
     72 
     73 # Verify data after the test has been "shot"
     74 <verify>
     75 <protocol>
     76 GET /%TESTNUMBER HTTP/1.1
     77 Host: %HOSTIP:%HTTPPORT
     78 Accept: */*
     79 
     80 GET /%TESTNUMBER HTTP/1.1
     81 Host: %HOSTIP:%HTTPPORT
     82 Authorization: Basic %b64[user:pass]b64%d29yZA==
     83 Accept: */*
     84 
     85 </protocol>
     86 </verify>
     87 
     88 </testcase>