File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / curl / tests / data / test2012
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Wed Jun 3 10:01:16 2020 UTC (5 years ago) by misho
Branches: curl, MAIN
CVS tags: v7_70_0p4, HEAD
curl

    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: 46
   18: Connection: close
   19: Content-Type: text/html
   20: Content-Disposition: filename=name2012; charset=funny; option=strange
   21: Funny-head: yesyes
   22: 
   23: Some contents 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, 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>
   59: perl %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: <strip>
   67: ^User-Agent:.*
   68: </strip>
   69: <protocol>
   70: GET /2012 HTTP/1.1
   71: Host: %HOSTIP:%HTTPPORT
   72: Accept: */*
   73: 
   74: </protocol>
   75: <file1 name="log/download2012">
   76: Some contents delivered from an HTTP resource
   77: </file1>
   78: <file2 name="log/stdout2012">
   79: </file2>
   80: <file3 name="log/stderr2012" mode="text">
   81: Metalink: parsing (file://%PWD/log/test2012.metalink) metalink/XML...
   82: Metalink: parsing (file://%PWD/log/test2012.metalink) WARNING (digest missing)
   83: Metalink: fetching (log/download2012) from (http://%HOSTIP:%HTTPPORT/2012)...
   84: Metalink: fetching (log/download2012) from (http://%HOSTIP:%HTTPPORT/2012) OK
   85: Metalink: validating (log/download2012)...
   86: Metalink: validating (log/download2012) FAILED (digest missing)
   87: </file3>
   88: <stripfile3>
   89: $_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
   90: </stripfile3>
   91: </verify>
   92: </testcase>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>