• 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: 56
18Connection: close
19Content-Type: text/html
20Content-Disposition: filename=name2021; charset=funny; option=strange
21Funny-head: yesyes
22
23Data that should not be 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, attempt Unix questionable file name IV
39 </name>
40<command option="no-output,no-include">
41--metalink file://%PWD/log/test2021.metalink
42</command>
43# local metalink file written before test command runs
44<file name="log/test2021.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/download2021 >/dev/null">
49   <verification>
50    <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
51   </verification>
52   <resources maxconnections="1">
53    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2021</url>
54   </resources>
55  </file>
56 </files>
57</metalink>
58</file>
59<postcheck>
60perl %SRCDIR/libtest/notexists.pl log/2021 log/name2021 log/download2021
61</postcheck>
62</client>
63
64#
65# Verify data after the test has been "shot"
66<verify>
67<file1 name="log/stdout2021">
68</file1>
69<file2 name="log/stderr2021">
70Metalink: parsing (file://%PWD/log/test2021.metalink) metalink/XML...
71Metalink: parsing (file://%PWD/log/test2021.metalink) WARNING (missing or invalid file name)
72Metalink: parsing (file://%PWD/log/test2021.metalink) FAILED
73</file2>
74<stripfile2>
75$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
76</stripfile2>
77</verify>
78</testcase>
79