Home | History | Annotate | Download | only in data
      1 <testcase>
      2 <info>
      3 <keywords>
      4 Metalink
      5 HTTP
      6 HTTP GET
      7 </keywords>
      8 </info>
      9 
     10 #
     11 # Server-side
     12 <reply>
     13 <data nocheck="yes">
     14 HTTP/1.1 200 OK
     15 Date: Wed, 20 Jun 2012 14:49:00 GMT
     16 Server: test-server/fake
     17 Content-Length: 37
     18 Connection: close
     19 Content-Type: text/html
     20 Content-Disposition: filename=name2005; charset=funny; option=strange
     21 Funny-head: yesyes
     22 
     23 Data delivered from an HTTP resource
     24 </data>
     25 </reply>
     26 
     27 #
     28 # Client-side
     29 <client>
     30 <server>
     31 http
     32 </server>
     33 <features>
     34 file
     35 Metalink
     36 </features>
     37  <name>
     38 Metalink local XML file, HTTP resource
     39  </name>
     40 <command option="no-output,no-include">
     41 --metalink file://%PWD/log/test2005.metalink
     42 </command>
     43 # local metalink file written before test command runs
     44 <file name="log/test2005.metalink">
     45 <?xml version="1.0" encoding="utf-8"?>
     46 <metalink version="3.0" xmlns="http://www.metalinker.org/">
     47  <files>
     48   <file name="log/download2005">
     49    <verification>
     50     <hash type="sha256">a430d26389c69b7a245a9ad692cf20b4dc026fb7c2ff8a2c164c49a77130d6d9</hash>
     51    </verification>
     52    <resources maxconnections="1">
     53     <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2005</url>
     54    </resources>
     55   </file>
     56  </files>
     57 </metalink>
     58 </file>
     59 <postcheck>
     60 perl %SRCDIR/libtest/notexists.pl log/2005 log/name2005
     61 </postcheck>
     62 </client>
     63 
     64 #
     65 # Verify data after the test has been "shot"
     66 <verify>
     67 <strip>
     68 ^User-Agent:.*
     69 </strip>
     70 <protocol>
     71 GET /2005 HTTP/1.1
     72 Host: %HOSTIP:%HTTPPORT
     73 Accept: */*
     74 
     75 </protocol>
     76 <file1 name="log/download2005">
     77 Data delivered from an HTTP resource
     78 </file1>
     79 <file2 name="log/stdout2005">
     80 </file2>
     81 <file3 name="log/stderr2005">
     82 Metalink: parsing (file://%PWD/log/test2005.metalink) metalink/XML...
     83 Metalink: parsing (file://%PWD/log/test2005.metalink) OK
     84 Metalink: fetching (log/download2005) from (http://%HOSTIP:%HTTPPORT/2005)...
     85 Metalink: fetching (log/download2005) from (http://%HOSTIP:%HTTPPORT/2005) OK
     86 Metalink: validating (log/download2005)...
     87 Metalink: validating (log/download2005) [sha-256] OK
     88 </file3>
     89 <stripfile3>
     90 $_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
     91 </stripfile3>
     92 </verify>
     93 </testcase>
     94