Debian Codegraph @

deps/curl/tests/data/test2007

raw
1 <testcase>
2 <info>
3 <keywords>
4 Metalink
5 HTTP
6 HTTP GET
7 -J
8 FILE
9 </keywords>
10 </info>
11
12 #
13 # Server-side
14 <reply>
15 <data nocheck="yes">
16 HTTP/1.1 200 OK
17 Date: Thu, 21 Jun 2012 14:50:02 GMT
18 Server: test-server/fake
19 Content-Length: 42
20 Connection: close
21 Content-Type: text/html
22 Content-Disposition: filename=name2007; charset=funny; option=strange
23 Funny-head: yesyes
24
25 Something delivered from an HTTP resource
26 </data>
27 </reply>
28
29 #
30 # Client-side
31 <client>
32 # This relies on the debug feature to allow us to set directory to store the
33 # -O and -J output in, using the CURL_TESTDIR variable. This test might use
34 # it upon failure only, successful execution won't actually use it.
35 <features>
36 debug
37 file
38 Metalink
39 </features>
40 <server>
41 http
42 </server>
43 <name>
44 Metalink local XML file, HTTP resource, using -O -J -D file
45 </name>
46 <setenv>
47 CURL_TESTDIR=%PWD/log
48 </setenv>
49 <command option="no-output,no-include">
50 --metalink file://%PWD/log/test2007.metalink -J -O -D log/heads2007
51 </command>
52 # local metalink file written before test command runs
53 <file name="log/test2007.metalink">
54 <?xml version="1.0" encoding="utf-8"?>
55 <metalink version="3.0" xmlns="http://www.metalinker.org/">
56 <files>
57 <file name="log/download2007">
58 <verification>
59 <hash type="md5">we-only-check-the-strongest-hash-provided</hash>
60 <hash type="sha256">52899e30f80e3490632d505653204e1fb5b02bda141048704ce9a0ed00b8a3f5</hash>
61 </verification>
62 <resources maxconnections="1">
63 <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2007</url>
64 </resources>
65 </file>
66 </files>
67 </metalink>
68 </file>
69 <postcheck>
70 perl %SRCDIR/libtest/notexists.pl log/2007 log/name2007
71 </postcheck>
72 </client>
73
74 #
75 # Verify data after the test has been "shot"
76 <verify>
77 <strip>
78 ^User-Agent:.*
79 </strip>
80 <protocol>
81 GET /2007 HTTP/1.1
82 Host: %HOSTIP:%HTTPPORT
83 Accept: */*
84
85 </protocol>
86 <file1 name="log/download2007">
87 Something delivered from an HTTP resource
88 </file1>
89 <stripfile2>
90 s/Last-Modified:.*//
91 </stripfile2>
92 <file2 name="log/heads2007">
93 Content-Length: 496
94 Accept-ranges: bytes
95
96
97 HTTP/1.1 200 OK
98 Date: Thu, 21 Jun 2012 14:50:02 GMT
99 Server: test-server/fake
100 Content-Length: 42
101 Connection: close
102 Content-Type: text/html
103 Content-Disposition: filename=name2007; charset=funny; option=strange
104 Funny-head: yesyes
105
106 </file2>
107 <file3 name="log/stdout2007">
108 </file3>
109 <file4 name="log/stderr2007" mode="text">
110 Metalink: parsing (file://%PWD/log/test2007.metalink) metalink/XML...
111 Metalink: parsing (file://%PWD/log/test2007.metalink) OK
112 Metalink: fetching (log/download2007) from (http://%HOSTIP:%HTTPPORT/2007)...
113 Metalink: fetching (log/download2007) from (http://%HOSTIP:%HTTPPORT/2007) OK
114 Metalink: validating (log/download2007)...
115 Metalink: validating (log/download2007) [sha-256] OK
116 </file4>
117 <stripfile4>
118 $_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
119 </stripfile4>
120 </verify>
121 </testcase>