quickjs-tart

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

test72 (1797B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP GET
      6 HTTP Digest auth
      7 </keywords>
      8 </info>
      9 # Server-side
     10 <reply>
     11 <data>
     12 HTTP/1.1 401 Authorization Required
     13 Server: Apache/1.3.27 (Darwin) PHP/4.1.2
     14 WWW-Authenticate: Basic realm="foothis"
     15 WWW-Authenticate: Digest realm="testrealm", nonce="1053604199"
     16 Content-Type: text/html; charset=iso-8859-1
     17 Content-Length: 26
     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 <data1000>
     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 
     30 This IS the real page!
     31 </data1000>
     32 
     33 <datacheck>
     34 HTTP/1.1 401 Authorization Required
     35 Server: Apache/1.3.27 (Darwin) PHP/4.1.2
     36 WWW-Authenticate: Basic realm="foothis"
     37 WWW-Authenticate: Digest realm="testrealm", nonce="1053604199"
     38 Content-Type: text/html; charset=iso-8859-1
     39 Content-Length: 26
     40 
     41 HTTP/1.1 200 OK
     42 Server: Apache/1.3.27 (Darwin) PHP/4.1.2
     43 Content-Type: text/html; charset=iso-8859-1
     44 Content-Length: 23
     45 
     46 This IS the real page!
     47 </datacheck>
     48 
     49 </reply>
     50 
     51 # Client-side
     52 <client>
     53 <server>
     54 http
     55 </server>
     56 <features>
     57 !SSPI
     58 crypto
     59 digest
     60 </features>
     61 <name>
     62 HTTP with Digest *OR* Basic authorization
     63 </name>
     64 <command>
     65 http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --anyauth
     66 </command>
     67 </client>
     68 
     69 # Verify data after the test has been "shot"
     70 <verify>
     71 <protocol>
     72 GET /%TESTNUMBER HTTP/1.1
     73 Host: %HOSTIP:%HTTPPORT
     74 User-Agent: curl/%VERSION
     75 Accept: */*
     76 
     77 GET /%TESTNUMBER HTTP/1.1
     78 Host: %HOSTIP:%HTTPPORT
     79 Authorization: Digest username="testuser", realm="testrealm", nonce="1053604199", uri="/%TESTNUMBER", response="9fcd1330377365a09bbcb33b2cbb25bd"
     80 User-Agent: curl/%VERSION
     81 Accept: */*
     82 
     83 </protocol>
     84 </verify>
     85 </testcase>