quickjs-tart

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

test2076 (1404B)


      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 swsclose
     13 WWW-Authenticate: Digest realm="testrealm", nonce="1"
     14 Content-Length: 26
     15 
     16 This is not the real page
     17 </data>
     18 
     19 # This is supposed to be returned when the server gets a
     20 # Authorization: Digest line passed-in from the client
     21 <data1000>
     22 HTTP/1.1 200 OK swsclose
     23 Content-Length: 23
     24 
     25 This IS the real page!
     26 </data1000>
     27 
     28 <datacheck>
     29 HTTP/1.1 401 Authorization Required swsclose
     30 WWW-Authenticate: Digest realm="testrealm", nonce="1"
     31 Content-Length: 26
     32 
     33 HTTP/1.1 200 OK swsclose
     34 Content-Length: 23
     35 
     36 This IS the real page!
     37 </datacheck>
     38 
     39 </reply>
     40 
     41 # Client-side
     42 <client>
     43 <server>
     44 http
     45 </server>
     46 <features>
     47 !SSPI
     48 crypto
     49 digest
     50 </features>
     51 <name>
     52 HTTP with digest auth and URI contains query
     53 </name>
     54 <command>
     55 "http://%HOSTIP:%HTTPPORT/%TESTNUMBER?query" -u testuser:testpass --digest
     56 </command>
     57 </client>
     58 
     59 # Verify data after the test has been "shot"
     60 <verify>
     61 <protocol>
     62 GET /%TESTNUMBER?query HTTP/1.1
     63 Host: %HOSTIP:%HTTPPORT
     64 User-Agent: curl/%VERSION
     65 Accept: */*
     66 
     67 GET /%TESTNUMBER?query HTTP/1.1
     68 Host: %HOSTIP:%HTTPPORT
     69 Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/%TESTNUMBER?query", response="5758bd3bbde7f33236e6ccd278eb59af"
     70 User-Agent: curl/%VERSION
     71 Accept: */*
     72 
     73 </protocol>
     74 </verify>
     75 </testcase>