<?xml version="1.0" encoding="US-ASCII"?>
<testcase>
<info>
<keywords>
--remote-header-name
</keywords>
</info>

# Server-side
<reply>

<data crlf="headers" nocheck="yes">
HTTP/1.1 301 OK
Location: %TESTNUMBER0002
Content-Length: 0

</data>

<data2 crlf="headers" nocheck="yes">
HTTP/1.1 301 OK
Location: %TESTNUMBER0003
Content-Length: 0

</data2>

<data3 crlf="headers" nocheck="yes">
HTTP/1.1 301 OK
Location: %TESTNUMBER0004
Content-Length: 0

</data3>

<data4 crlf="headers" nocheck="yes">
HTTP/1.1 200 OK
Content-Length: 8

content
</data4>

</reply>

# Client-side
<client>
<features>
IPv6
proxy
</features>
<server>
http-proxy
http
https
</server>
<name>
-J with multiple redirects, use the last name
</name>
<command option="no-output,no-include">
-L -O -J http://%HOSTIP:%HTTPPORT --output-dir=%LOGDIR
</command>
</client>

# Verify data after the test has been "shot"
<verify>
<protocol crlf="headers">
GET / HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*

GET /%TESTNUMBER0002 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*

GET /%TESTNUMBER0003 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*

GET /%TESTNUMBER0004 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*

</protocol>
<file name="%LOGDIR/%TESTNUMBER0004">
content
</file>
</verify>
</testcase>
