Annotation of embedaddon/curl/tests/data/test2007, revision 1.1.1.1
1.1 misho 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: # The Content-Length replace here is to handle with 4/5 digit port number in
90: # the content
91: <stripfile2>
92: s/Last-Modified:.*//
93: s/Content-Length: 49[67]/Content-Length: yeps/
94: </stripfile2>
95: <file2 name="log/heads2007">
96: Content-Length: yeps
97: Accept-ranges: bytes
98:
99:
100: HTTP/1.1 200 OK
101: Date: Thu, 21 Jun 2012 14:50:02 GMT
102: Server: test-server/fake
103: Content-Length: 42
104: Connection: close
105: Content-Type: text/html
106: Content-Disposition: filename=name2007; charset=funny; option=strange
107: Funny-head: yesyes
108:
109: </file2>
110: <file3 name="log/stdout2007">
111: </file3>
112: <file4 name="log/stderr2007" mode="text">
113: Metalink: parsing (file://%PWD/log/test2007.metalink) metalink/XML...
114: Metalink: parsing (file://%PWD/log/test2007.metalink) OK
115: Metalink: fetching (log/download2007) from (http://%HOSTIP:%HTTPPORT/2007)...
116: Metalink: fetching (log/download2007) from (http://%HOSTIP:%HTTPPORT/2007) OK
117: Metalink: validating (log/download2007)...
118: Metalink: validating (log/download2007) [sha-256] OK
119: </file4>
120: <stripfile4>
121: $_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
122: </stripfile4>
123: </verify>
124: </testcase>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>