Return to test2011 CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / curl / tests / data |
1.1 ! misho 1: <testcase> ! 2: <info> ! 3: <keywords> ! 4: Metalink ! 5: HTTP ! 6: HTTP GET ! 7: </keywords> ! 8: </info> ! 9: ! 10: # ! 11: # Server-side ! 12: <reply> ! 13: <data nocheck="yes"> ! 14: HTTP/1.1 200 OK ! 15: Date: Wed, 20 Jun 2012 14:49:00 GMT ! 16: Server: test-server/fake ! 17: Content-Length: 37 ! 18: Connection: close ! 19: Content-Type: text/html ! 20: Content-Disposition: filename=name2011; charset=funny; option=strange ! 21: Funny-head: yesyes ! 22: ! 23: Data delivered from an HTTP resource ! 24: </data> ! 25: </reply> ! 26: ! 27: # ! 28: # Client-side ! 29: <client> ! 30: <server> ! 31: http ! 32: </server> ! 33: <features> ! 34: file ! 35: Metalink ! 36: </features> ! 37: <name> ! 38: Metalink local XML file, HTTP resource, hash mismatch ! 39: </name> ! 40: <command option="no-output,no-include"> ! 41: --metalink file://%PWD/log/test2011.metalink ! 42: </command> ! 43: # local metalink file written before test command runs ! 44: <file name="log/test2011.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/download2011"> ! 49: <verification> ! 50: <hash type="sha256">badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb</hash> ! 51: </verification> ! 52: <resources maxconnections="1"> ! 53: <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2011</url> ! 54: </resources> ! 55: </file> ! 56: </files> ! 57: </metalink> ! 58: </file> ! 59: <postcheck> ! 60: perl %SRCDIR/libtest/notexists.pl log/2011 log/name2011 ! 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> ! 71: GET /2011 HTTP/1.1 ! 72: Host: %HOSTIP:%HTTPPORT ! 73: Accept: */* ! 74: ! 75: </protocol> ! 76: <file1 name="log/download2011"> ! 77: Data delivered from an HTTP resource ! 78: </file1> ! 79: <file2 name="log/stdout2011"> ! 80: </file2> ! 81: <file3 name="log/stderr2011" mode="text"> ! 82: Metalink: parsing (file://%PWD/log/test2011.metalink) metalink/XML... ! 83: Metalink: parsing (file://%PWD/log/test2011.metalink) OK ! 84: Metalink: fetching (log/download2011) from (http://%HOSTIP:%HTTPPORT/2011)... ! 85: Metalink: fetching (log/download2011) from (http://%HOSTIP:%HTTPPORT/2011) OK ! 86: Metalink: validating (log/download2011)... ! 87: Metalink: validating (log/download2011) [sha-256] FAILED (digest mismatch) ! 88: </file3> ! 89: <stripfile3> ! 90: $_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i)) ! 91: </stripfile3> ! 92: </verify> ! 93: </testcase>