• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<testcase>
2<info>
3<keywords>
4Metalink
5HTTP
6HTTP GET
7</keywords>
8</info>
9
10#
11# Server-side
12<reply>
13<data nocheck="yes">
14HTTP/1.1 200 OK
15Date: Wed, 20 Jun 2012 14:49:00 GMT
16Server: test-server/fake
17Content-Length: 37
18Connection: close
19Content-Type: text/html
20Content-Disposition: filename=name2005; charset=funny; option=strange
21Funny-head: yesyes
22
23Data delivered from an HTTP resource
24</data>
25</reply>
26
27#
28# Client-side
29<client>
30<server>
31http
32</server>
33<features>
34file
35Metalink
36</features>
37 <name>
38Metalink 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>
60perl %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>
71GET /2005 HTTP/1.1
72Host: %HOSTIP:%HTTPPORT
73Accept: */*
74
75</protocol>
76<file1 name="log/download2005">
77Data delivered from an HTTP resource
78</file1>
79<file2 name="log/stdout2005">
80</file2>
81<file3 name="log/stderr2005">
82Metalink: parsing (file://%PWD/log/test2005.metalink) metalink/XML...
83Metalink: parsing (file://%PWD/log/test2005.metalink) OK
84Metalink: fetching (log/download2005) from (http://%HOSTIP:%HTTPPORT/2005)...
85Metalink: fetching (log/download2005) from (http://%HOSTIP:%HTTPPORT/2005) OK
86Metalink: validating (log/download2005)...
87Metalink: validating (log/download2005) [sha-256] OK
88</file3>
89<stripfile3>
90$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
91</stripfile3>
92</verify>
93</testcase>
94