quickjs-tart

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

test1566 (1096B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP GET
      6 --etag-compare
      7 </keywords>
      8 </info>
      9 
     10 #
     11 # Server-side
     12 <reply>
     13 <data nocheck="yes">
     14 HTTP/1.1 304 Not modified
     15 Date: Tue, 09 Nov 2010 14:49:00 GMT
     16 Server: test-server/fake
     17 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
     18 ETag: "21025-dc7-39462498"
     19 Connection: close
     20 Content-Type: text/html
     21 
     22 </data>
     23 </reply>
     24 
     25 #
     26 # Client-side
     27 <client>
     28 <server>
     29 http
     30 </server>
     31 <name>
     32 --etag-compare that gets a 304 back shouldn't overwrite the file
     33 </name>
     34 <command option="no-output,no-include">
     35 http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o %LOGDIR/output%TESTNUMBER --etag-compare %LOGDIR/etag%TESTNUMBER
     36 </command>
     37 <file name="%LOGDIR/etag%TESTNUMBER">
     38 "123456"
     39 </file>
     40 <file1 name="%LOGDIR/output%TESTNUMBER">
     41 downloaded already
     42 </file1>
     43 
     44 </client>
     45 
     46 #
     47 # Verify data after the test has been "shot"
     48 <verify>
     49 <protocol>
     50 GET /%TESTNUMBER HTTP/1.1
     51 Host: %HOSTIP:%HTTPPORT
     52 User-Agent: curl/%VERSION
     53 Accept: */*
     54 If-None-Match: "123456"
     55 
     56 </protocol>
     57 
     58 # verify that the target file is untouched
     59 <file name="%LOGDIR/output%TESTNUMBER">
     60 downloaded already
     61 </file>
     62 </verify>
     63 </testcase>