curl-curl/tests/data/test1983
Daniel Stenberg e5087ac9fc
http: on 303, switch to GET
... unless it is a POST and the user explicitly asked to keep doing
POST.

Add test1983/1984: verify --follow with 303 and PUT + custom GET

Fixes #20715
Reported-by: Dan Arnfield
Closes #21280
2026-04-10 09:39:39 +02:00

72 lines
1.2 KiB
XML

<?xml version="1.0" encoding="US-ASCII"?>
<testcase>
<info>
<keywords>
HTTP
HTTP DELETE
followlocation
</keywords>
</info>
# Server-side
<reply>
<data>
HTTP/1.1 303 OK swsclose
Location: moo.html%AMPtestcase=/%TESTNUMBER0002
Date: Tue, 09 Nov 2010 14:49:00 GMT
Connection: close
</data>
<data2>
HTTP/1.1 200 OK swsclose
Location: this should be ignored
Date: Tue, 09 Nov 2010 14:49:00 GMT
Connection: close
body
</data2>
<datacheck>
HTTP/1.1 303 OK swsclose
Location: moo.html%AMPtestcase=/%TESTNUMBER0002
Date: Tue, 09 Nov 2010 14:49:00 GMT
Connection: close
HTTP/1.1 200 OK swsclose
Location: this should be ignored
Date: Tue, 09 Nov 2010 14:49:00 GMT
Connection: close
body
</datacheck>
</reply>
# Client-side
<client>
<server>
http
</server>
<name>
HTTP DELETE with --follow and 303 redirect
</name>
<command>
http://%HOSTIP:%HTTPPORT/blah/%TESTNUMBER --follow -X DELETE
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<protocol crlf="yes">
DELETE /blah/%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
GET /blah/moo.html%AMPtestcase=/%TESTNUMBER0002 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
</protocol>
</verify>
</testcase>