lib: add CURLFOLLOW_OBEYCODE and CURLFOLLOW_FIRSTONLY

With this change, the argument passed to the CURLOPT_FOLLOWLOCATION
option is now instead a "mode" instead of just a boolean. Documentation
is extended to describe the two new modes.

Test 1571 to 1581 verify.

Closes #16473
This commit is contained in:
Daniel Stenberg 2025-03-03 11:35:48 +01:00
parent 294136b754
commit fb13923dd6
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
23 changed files with 1328 additions and 34 deletions

View file

@ -207,7 +207,8 @@ test1540 test1541 test1542 test1543 test1544 test1545 test1546 \
\
test1550 test1551 test1552 test1553 test1554 test1555 test1556 test1557 \
test1558 test1559 test1560 test1561 test1562 test1563 test1564 test1565 \
test1566 test1567 test1568 test1569 test1570 \
test1566 test1567 test1568 test1569 test1570 test1571 test1572 test1573 \
test1574 test1575 test1576 test1577 test1578 test1579 test1580 test1581 \
\
test1590 test1591 test1592 test1593 test1594 test1595 test1596 test1597 \
test1598 \

95
tests/data/test1571 Normal file
View file

@ -0,0 +1,95 @@
<testcase>
<info>
<keywords>
CURLFOLLOW_OBEYCODE
CURLOPT_FOLLOWLOCATION
</keywords>
</info>
#
# Server-side
<reply>
<data crlf="yes">
HTTP/1.1 302 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Location: %TESTNUMBER0001
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: yesyes
-foo-
</data>
<data1 crlf="yes">
HTTP/1.1 200 OK
Content-Length: 6
Connection: close
Content-Type: text/html
-bar-
</data>
<datacheck crlf="yes">
HTTP/1.1 302 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Location: %TESTNUMBER0001
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: yesyes
HTTP/1.1 200 OK
Content-Length: 6
Connection: close
Content-Type: text/html
-bar-
</datacheck>
</reply>
# Client-side
<client>
<server>
http
</server>
<features>
http
</features>
<tool>
lib%TESTNUMBER
</tool>
<name>
CURLFOLLOW_OBEYCODE with custom POST method, 302 => GET
</name>
<command>
http://%HOSTIP:%HTTPPORT/%TESTNUMBER 1571
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol nonewline="yes" crlf="yes">
IGLOO /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 3
Content-Type: application/x-www-form-urlencoded
mooGET /%TESTNUMBER0001 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
</verify>
</testcase>

97
tests/data/test1572 Normal file
View file

@ -0,0 +1,97 @@
<testcase>
<info>
<keywords>
CURLFOLLOW_OBEYCODE
CURLOPT_FOLLOWLOCATION
</keywords>
</info>
#
# Server-side
<reply>
<data crlf="yes">
HTTP/1.1 308 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Location: %TESTNUMBER0001
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: yesyes
-foo-
</data>
<data1 crlf="yes">
HTTP/1.1 200 OK
Content-Length: 6
Connection: close
Content-Type: text/html
-bar-
</data>
<datacheck crlf="yes">
HTTP/1.1 308 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Location: %TESTNUMBER0001
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: yesyes
HTTP/1.1 200 OK
Content-Length: 6
Connection: close
Content-Type: text/html
-bar-
</datacheck>
</reply>
# Client-side
<client>
<server>
http
</server>
<features>
http
</features>
<tool>
lib1571
</tool>
<name>
CURLFOLLOW_OBEYCODE with custom POST method, 308 => custom
</name>
<command>
http://%HOSTIP:%HTTPPORT/%TESTNUMBER 1571
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol nonewline="yes" crlf="yes">
IGLOO /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 3
Content-Type: application/x-www-form-urlencoded
mooIGLOO /%TESTNUMBER0001 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 3
Content-Type: application/x-www-form-urlencoded
moo
</protocol>
</verify>
</testcase>

92
tests/data/test1573 Normal file
View file

@ -0,0 +1,92 @@
<testcase>
<info>
<keywords>
CURLFOLLOW_OBEYCODE
CURLOPT_FOLLOWLOCATION
</keywords>
</info>
#
# Server-side
<reply>
<data crlf="yes">
HTTP/1.1 302 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Location: %TESTNUMBER0001
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: yesyes
-foo-
</data>
<data1 crlf="yes">
HTTP/1.1 200 OK
Content-Length: 6
Connection: close
Content-Type: text/html
-bar-
</data>
<datacheck crlf="yes">
HTTP/1.1 302 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Location: %TESTNUMBER0001
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: yesyes
HTTP/1.1 200 OK
Content-Length: 6
Connection: close
Content-Type: text/html
-bar-
</datacheck>
</reply>
# Client-side
<client>
<server>
http
</server>
<features>
http
</features>
<tool>
lib1571
</tool>
<name>
CURLFOLLOW_OBEYCODE with custom GET method, 301 => custom
</name>
<command>
http://%HOSTIP:%HTTPPORT/%TESTNUMBER 1573
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol crlf="yes">
IGLOO /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
IGLOO /%TESTNUMBER0001 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
</verify>
</testcase>

92
tests/data/test1574 Normal file
View file

@ -0,0 +1,92 @@
<testcase>
<info>
<keywords>
CURLFOLLOW_FIRSTONLY
CURLOPT_FOLLOWLOCATION
</keywords>
</info>
#
# Server-side
<reply>
<data crlf="yes">
HTTP/1.1 302 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Location: %TESTNUMBER0001
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: yesyes
-foo-
</data>
<data1 crlf="yes">
HTTP/1.1 200 OK
Content-Length: 6
Connection: close
Content-Type: text/html
-bar-
</data>
<datacheck crlf="yes">
HTTP/1.1 302 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Location: %TESTNUMBER0001
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: yesyes
HTTP/1.1 200 OK
Content-Length: 6
Connection: close
Content-Type: text/html
-bar-
</datacheck>
</reply>
# Client-side
<client>
<server>
http
</server>
<features>
http
</features>
<tool>
lib1571
</tool>
<name>
CURLFOLLOW_FIRSTONLY with custom GET method, 301 => GET
</name>
<command>
http://%HOSTIP:%HTTPPORT/%TESTNUMBER 1574
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol crlf="yes">
IGLOO /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /%TESTNUMBER0001 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
</verify>
</testcase>

97
tests/data/test1575 Normal file
View file

@ -0,0 +1,97 @@
<testcase>
<info>
<keywords>
CURLFOLLOW_FIRSTONLY
CURLOPT_FOLLOWLOCATION
</keywords>
</info>
#
# Server-side
<reply>
<data crlf="yes">
HTTP/1.1 308 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Location: %TESTNUMBER0001
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: yesyes
-foo-
</data>
<data1 crlf="yes">
HTTP/1.1 200 OK
Content-Length: 6
Connection: close
Content-Type: text/html
-bar-
</data>
<datacheck crlf="yes">
HTTP/1.1 308 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Location: %TESTNUMBER0001
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: yesyes
HTTP/1.1 200 OK
Content-Length: 6
Connection: close
Content-Type: text/html
-bar-
</datacheck>
</reply>
# Client-side
<client>
<server>
http
</server>
<features>
http
</features>
<tool>
lib1571
</tool>
<name>
CURLFOLLOW_FIRSTONLY with custom POST method, 308 => POST
</name>
<command>
http://%HOSTIP:%HTTPPORT/%TESTNUMBER 1575
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol nonewline="yes" crlf="yes">
IGLOO /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 3
Content-Type: application/x-www-form-urlencoded
mooPOST /%TESTNUMBER0001 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 3
Content-Type: application/x-www-form-urlencoded
moo
</protocol>
</verify>
</testcase>

95
tests/data/test1576 Normal file
View file

@ -0,0 +1,95 @@
<testcase>
<info>
<keywords>
CURLFOLLOW_OBEYCODE
CURLOPT_FOLLOWLOCATION
</keywords>
</info>
#
# Server-side
<reply>
<data crlf="yes">
HTTP/1.1 302 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Location: %TESTNUMBER0001
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: yesyes
-foo-
</data>
<data1 crlf="yes">
HTTP/1.1 200 OK
Content-Length: 6
Connection: close
Content-Type: text/html
-bar-
</data>
<datacheck crlf="yes">
HTTP/1.1 302 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Location: %TESTNUMBER0001
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: yesyes
HTTP/1.1 200 OK
Content-Length: 6
Connection: close
Content-Type: text/html
-bar-
</datacheck>
</reply>
# Client-side
<client>
<server>
http
</server>
<features>
http
</features>
<tool>
lib%TESTNUMBER
</tool>
<name>
CURLFOLLOW_OBEYCODE with custom PUT method, 302 => custom
</name>
<command>
http://%HOSTIP:%HTTPPORT/%TESTNUMBER 1576
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol nonewline="yes" crlf="yes">
CURL /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 45
request indicates that the client, which madeCURL /%TESTNUMBER0001 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 45
request indicates that the client, which made
</protocol>
</verify>
</testcase>

95
tests/data/test1577 Normal file
View file

@ -0,0 +1,95 @@
<testcase>
<info>
<keywords>
CURLFOLLOW_OBEYCODE
CURLOPT_FOLLOWLOCATION
</keywords>
</info>
#
# Server-side
<reply>
<data crlf="yes">
HTTP/1.1 308 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Location: %TESTNUMBER0001
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: yesyes
-foo-
</data>
<data1 crlf="yes">
HTTP/1.1 200 OK
Content-Length: 6
Connection: close
Content-Type: text/html
-bar-
</data>
<datacheck crlf="yes">
HTTP/1.1 308 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Location: %TESTNUMBER0001
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: yesyes
HTTP/1.1 200 OK
Content-Length: 6
Connection: close
Content-Type: text/html
-bar-
</datacheck>
</reply>
# Client-side
<client>
<server>
http
</server>
<features>
http
</features>
<tool>
lib1576
</tool>
<name>
CURLFOLLOW_OBEYCODE with custom PUT method, 308 => custom
</name>
<command>
http://%HOSTIP:%HTTPPORT/%TESTNUMBER %TESTNUMBER
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol nonewline="yes" crlf="yes">
CURL /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 45
request indicates that the client, which madeCURL /%TESTNUMBER0001 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 45
request indicates that the client, which made
</protocol>
</verify>
</testcase>

95
tests/data/test1578 Normal file
View file

@ -0,0 +1,95 @@
<testcase>
<info>
<keywords>
CURLFOLLOW_FIRSTONLY
CURLOPT_FOLLOWLOCATION
</keywords>
</info>
#
# Server-side
<reply>
<data crlf="yes">
HTTP/1.1 302 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Location: %TESTNUMBER0001
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: yesyes
-foo-
</data>
<data1 crlf="yes">
HTTP/1.1 200 OK
Content-Length: 6
Connection: close
Content-Type: text/html
-bar-
</data>
<datacheck crlf="yes">
HTTP/1.1 302 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Location: %TESTNUMBER0001
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: yesyes
HTTP/1.1 200 OK
Content-Length: 6
Connection: close
Content-Type: text/html
-bar-
</datacheck>
</reply>
# Client-side
<client>
<server>
http
</server>
<features>
http
</features>
<tool>
lib1576
</tool>
<name>
CURLFOLLOW_FIRSTONLY with custom PUT method, 302 => PUT
</name>
<command>
http://%HOSTIP:%HTTPPORT/%TESTNUMBER %TESTNUMBER
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol nonewline="yes" crlf="yes">
CURL /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 45
request indicates that the client, which madePUT /%TESTNUMBER0001 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 45
request indicates that the client, which made
</protocol>
</verify>
</testcase>

93
tests/data/test1579 Normal file
View file

@ -0,0 +1,93 @@
<testcase>
<info>
<keywords>
CURLFOLLOW_OBEYCODE
CURLOPT_FOLLOWLOCATION
</keywords>
</info>
#
# Server-side
<reply>
<data crlf="yes">
HTTP/1.1 303 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Location: %TESTNUMBER0001
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: yesyes
-foo-
</data>
<data1 crlf="yes">
HTTP/1.1 200 OK
Content-Length: 6
Connection: close
Content-Type: text/html
-bar-
</data>
<datacheck crlf="yes">
HTTP/1.1 303 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Location: %TESTNUMBER0001
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: yesyes
HTTP/1.1 200 OK
Content-Length: 6
Connection: close
Content-Type: text/html
-bar-
</datacheck>
</reply>
# Client-side
<client>
<server>
http
</server>
<features>
http
</features>
<tool>
lib1576
</tool>
<name>
CURLFOLLOW_OBEYCODE with custom PUT method, 303 => GET
</name>
<command>
http://%HOSTIP:%HTTPPORT/%TESTNUMBER %TESTNUMBER
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol crlf="yes">
CURL /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 45
request indicates that the client, which madeGET /%TESTNUMBER0001 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
</verify>
</testcase>

95
tests/data/test1580 Normal file
View file

@ -0,0 +1,95 @@
<testcase>
<info>
<keywords>
CURLFOLLOW_FIRSTONLY
CURLOPT_FOLLOWLOCATION
</keywords>
</info>
#
# Server-side
<reply>
<data crlf="yes">
HTTP/1.1 308 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Location: %TESTNUMBER0001
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: yesyes
-foo-
</data>
<data1 crlf="yes">
HTTP/1.1 200 OK
Content-Length: 6
Connection: close
Content-Type: text/html
-bar-
</data>
<datacheck crlf="yes">
HTTP/1.1 308 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Location: %TESTNUMBER0001
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: yesyes
HTTP/1.1 200 OK
Content-Length: 6
Connection: close
Content-Type: text/html
-bar-
</datacheck>
</reply>
# Client-side
<client>
<server>
http
</server>
<features>
http
</features>
<tool>
lib1576
</tool>
<name>
CURLFOLLOW_FIRSTONLY with custom PUT method, 308 => PUT
</name>
<command>
http://%HOSTIP:%HTTPPORT/%TESTNUMBER 1578
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol nonewline="yes" crlf="yes">
CURL /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 45
request indicates that the client, which madePUT /%TESTNUMBER0001 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 45
request indicates that the client, which made
</protocol>
</verify>
</testcase>

97
tests/data/test1581 Normal file
View file

@ -0,0 +1,97 @@
<testcase>
<info>
<keywords>
CURLFOLLOW_OBEYCODE
CURLOPT_FOLLOWLOCATION
</keywords>
</info>
#
# Server-side
<reply>
<data crlf="yes">
HTTP/1.1 301 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Location: %TESTNUMBER0001
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: yesyes
-foo-
</data>
<data1 crlf="yes">
HTTP/1.1 200 OK
Content-Length: 6
Connection: close
Content-Type: text/html
-bar-
</data>
<datacheck crlf="yes">
HTTP/1.1 301 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Location: %TESTNUMBER0001
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: yesyes
HTTP/1.1 200 OK
Content-Length: 6
Connection: close
Content-Type: text/html
-bar-
</datacheck>
</reply>
# Client-side
<client>
<server>
http
</server>
<features>
http
</features>
<tool>
lib1571
</tool>
<name>
CURLFOLLOW_OBEYCODE with custom POST301 method, 301 => custom
</name>
<command>
http://%HOSTIP:%HTTPPORT/%TESTNUMBER 1581
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol nonewline="yes" crlf="yes">
IGLOO /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 3
Content-Type: application/x-www-form-urlencoded
mooIGLOO /%TESTNUMBER0001 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 3
Content-Type: application/x-www-form-urlencoded
moo
</protocol>
</verify>
</testcase>