<?xml version="1.0" encoding="US-ASCII"?>
<testcase>
<info>
<keywords>
HTTP
HTTP proxy
followlocation
aws-sigv4
</keywords>
</info>
# Server-side
<reply>
<data>
HTTP/1.1 302 OK
Date: Tue, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake swsclose
Content-Type: text/html
Funny-head: yesyes
Location: http://goto.second.host.now/%TESTNUMBER0002
Content-Length: 8
Connection: close

contents
</data>
<data2>
HTTP/1.1 200 OK
Date: Tue, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake swsclose
Content-Type: text/html
Funny-head: yesyes
Content-Length: 9

contents
</data2>

<datacheck>
HTTP/1.1 302 OK
Date: Tue, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake swsclose
Content-Type: text/html
Funny-head: yesyes
Location: http://goto.second.host.now/%TESTNUMBER0002
Content-Length: 8
Connection: close

HTTP/1.1 200 OK
Date: Tue, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake swsclose
Content-Type: text/html
Funny-head: yesyes
Content-Length: 9

contents
</datacheck>
</reply>

# Client-side
<client>
<server>
http
</server>
<name>
AWS SigV4 trusted redirect to a different host
</name>
<command>
http://first.host.it.is/we/want/that/page/%TESTNUMBER -x %HOSTIP:%HTTPPORT -u user:secret --aws-sigv4 "aws:amz:us-east-2:es" --location-trusted
</command>
<features>
Debug
aws
proxy
</features>
</client>

# Verify data after the test has been "shot"
<verify>
<protocol crlf="headers">
GET http://first.host.it.is/we/want/that/page/%TESTNUMBER HTTP/1.1
Host: first.host.it.is
Authorization: AWS4-HMAC-SHA256 Credential=user/19700101/us-east-2/es/aws4_request, SignedHeaders=host;x-amz-date, Signature=c540681cd0bba0cd9f6983a4529a45545ca4693192b65f60d8288ea617670f55
X-Amz-Date: 19700101T000000Z
User-Agent: curl/%VERSION
Accept: */*
Proxy-Connection: Keep-Alive

GET http://goto.second.host.now/%TESTNUMBER0002 HTTP/1.1
Host: goto.second.host.now
Authorization: AWS4-HMAC-SHA256 Credential=user/19700101/us-east-2/es/aws4_request, SignedHeaders=host;x-amz-date, Signature=f73dad70768d102fbfc307cedf6c77a5ef2ce9da51989647b6240e903340dd26
X-Amz-Date: 19700101T000000Z
User-Agent: curl/%VERSION
Accept: */*
Proxy-Connection: Keep-Alive

</protocol>
</verify>
</testcase>
