quickjs-tart

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

test88 (2059B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP PUT
      6 HTTP Digest auth
      7 </keywords>
      8 </info>
      9 
     10 # Server-side
     11 <reply>
     12 <servercmd>
     13 auth_required
     14 </servercmd>
     15 <data>
     16 HTTP/1.1 401 Authorization Required swsclose
     17 Server: Apache/1.3.27 (Darwin) PHP/4.1.2
     18 WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
     19 Content-Type: text/html; charset=iso-8859-1
     20 Connection: close
     21 
     22 This is not the real page
     23 </data>
     24 
     25 # This is supposed to be returned when the server gets a
     26 # Authorization: Digest line passed-in from the client
     27 <data1000>
     28 HTTP/1.1 200 OK swsclose
     29 Server: Apache/1.3.27 (Darwin) PHP/4.1.2
     30 Content-Type: text/html; charset=iso-8859-1
     31 Connection: close
     32 
     33 This IS the real page!
     34 </data1000>
     35 
     36 <datacheck>
     37 HTTP/1.1 401 Authorization Required swsclose
     38 Server: Apache/1.3.27 (Darwin) PHP/4.1.2
     39 WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
     40 Content-Type: text/html; charset=iso-8859-1
     41 Connection: close
     42 
     43 HTTP/1.1 200 OK swsclose
     44 Server: Apache/1.3.27 (Darwin) PHP/4.1.2
     45 Content-Type: text/html; charset=iso-8859-1
     46 Connection: close
     47 
     48 This IS the real page!
     49 </datacheck>
     50 
     51 </reply>
     52 
     53 # Client-side
     54 <client>
     55 <server>
     56 http
     57 </server>
     58 <features>
     59 !SSPI
     60 crypto
     61 digest
     62 </features>
     63 <name>
     64 HTTP PUT with Digest authorization
     65 </name>
     66 <command>
     67 http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T %LOGDIR/put%TESTNUMBER -u testuser:testpass --digest
     68 </command>
     69 <file name="%LOGDIR/put%TESTNUMBER">
     70 This is data we upload with PUT
     71 a second line
     72 line three
     73 four is the number of lines
     74 </file>
     75 </client>
     76 
     77 # Verify data after the test has been "shot"
     78 <verify>
     79 <protocol>
     80 PUT /%TESTNUMBER HTTP/1.1
     81 Host: %HOSTIP:%HTTPPORT
     82 User-Agent: curl/%VERSION
     83 Accept: */*
     84 Content-Length: 0
     85 
     86 PUT /%TESTNUMBER HTTP/1.1
     87 Host: %HOSTIP:%HTTPPORT
     88 Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/%TESTNUMBER", response="78a49fa53d0c228778297687d4168e71"
     89 User-Agent: curl/%VERSION
     90 Accept: */*
     91 Content-Length: 85
     92 
     93 This is data we upload with PUT
     94 a second line
     95 line three
     96 four is the number of lines
     97 </protocol>
     98 </verify>
     99 </testcase>