• Home
  • History
  • Annotate
  • 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: 46
18Connection: close
19Content-Type: text/html
20Content-Disposition: filename=name2012; charset=funny; option=strange
21Funny-head: yesyes
22
23Some contents 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, without hash
39 </name>
40<command option="no-output,no-include">
41--metalink file://%PWD/log/test2012.metalink
42</command>
43# local metalink file written before test command runs
44<file name="log/test2012.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/download2012">
49   <verification>
50   </verification>
51   <resources maxconnections="1">
52    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2012</url>
53   </resources>
54  </file>
55 </files>
56</metalink>
57</file>
58<postcheck>
59perl %SRCDIR/libtest/notexists.pl log/2012 log/name2012
60</postcheck>
61</client>
62
63#
64# Verify data after the test has been "shot"
65<verify>
66<protocol>
67GET /2012 HTTP/1.1
68Host: %HOSTIP:%HTTPPORT
69User-Agent: curl/%VERSION
70Accept: */*
71
72</protocol>
73<file1 name="log/download2012">
74Some contents delivered from an HTTP resource
75</file1>
76<file2 name="log/stdout2012">
77</file2>
78<file3 name="log/stderr2012" mode="text">
79Metalink: parsing (file://%PWD/log/test2012.metalink) metalink/XML...
80Metalink: parsing (file://%PWD/log/test2012.metalink) WARNING (digest missing)
81Metalink: fetching (log/download2012) from (http://%HOSTIP:%HTTPPORT/2012)...
82Metalink: fetching (log/download2012) from (http://%HOSTIP:%HTTPPORT/2012) OK
83Metalink: validating (log/download2012)...
84Metalink: validating (log/download2012) FAILED (digest missing)
85</file3>
86<stripfile3>
87$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
88</stripfile3>
89</verify>
90</testcase>
91