/
githubmirror
/
curl
Обзор
Документация
Войти
/
githubmirror
/
curl
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tests/data/test1984
76 строк
2 KB
Daniel Stenberg
http: on 303, switch to GET
10 апр 2026, 10:39
Не верифицирован
10 апр 2026, 10:39
e5087ac
Код
Авторство
О чём код?
<?xml version="1.0" encoding="US-ASCII"?> <testcase> <info> <keywords> HTTP HTTP PUT 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 PUT with 303 redirect and --follow </name> <command> http://%HOSTIP:%HTTPPORT/blah/%TESTNUMBER --follow -T %LOGDIR/upload </command> <file name="%LOGDIR/upload"> Except for responses to a HEAD request, the representation of a 303 response ought to contain a short hypertext note with a hyperlink to the same URI reference provided in the Location header field. </file> </client> # Verify data after the test has been "shot" <verify> <protocol crlf="headers"> PUT /blah/%TESTNUMBER HTTP/1.1 Host: %HOSTIP:%HTTPPORT User-Agent: curl/%VERSION Accept: */* Content-Length: 199 Except for responses to a HEAD request, the representation of a 303 response ought to contain a short hypertext note with a hyperlink to the same URI reference provided in the Location header field. GET /blah/moo.html%AMPtestcase=/%TESTNUMBER0002 HTTP/1.1 Host: %HOSTIP:%HTTPPORT User-Agent: curl/%VERSION Accept: */* </protocol> </verify> </testcase>