#!/bin/bash

echo ................... This should give the ChangeLog file:
curl -s 'http://www.poeml.de/transmetalink-test/ChangeLog' | head -3

echo
echo ................... This should give the metalink:
curl -s 'http://www.poeml.de/transmetalink-test/ChangeLog.metalink' | head -3

echo
echo ................... This should give a redirect to the metalink:
curl -s -H 'Accept: foobar,application/metalink+xml,baz' \
     'http://www.poeml.de/transmetalink-test/ChangeLog' | head -6

echo
echo ................... This should give the metalink:
curl -s -H 'Accept: foobar,application/metalink+xml,baz' \
     'http://www.poeml.de/transmetalink-test/ChangeLog.metalink' | head -6

echo
echo ................... This should give a hello world
curl -s -H 'Accept: foobar,application/metalink+xml,baz' \
     'http://www.poeml.de/transmetalink-test/file_without_metalink' | head -6

echo
echo ................... This should give another file
curl -s 'http://www.poeml.de/transmetalink-test/content' | head -3

echo
echo ................... This should give the metalink right away, by internal redirection
curl -s -H 'Accept: foobar,application/metalink+xml,baz' \
     'http://www.poeml.de/transmetalink-test/content' | head -6
echo
