curl-curl/tests/data/test3032
Viktor Szakats 4d2a05d3fe
tests: use crlf=yes attribute more
To make special newlines more explicit and visible.
Mostly in `<protocol>` sections, some in `<data*>` and `<upload>`.

Reducing the number of `tests/data/test*`:
- CRLF newlines from 21535 to 11337.
- files with mixed newlines from 1335 to 707.

Also delete empty `<protocol>` sections.

Closes #19284
2025-10-31 15:01:08 +01:00

113 lines
1.9 KiB
Plaintext

<testcase>
<info>
<keywords>
HTTP
--location
</keywords>
</info>
# Server-side
<reply>
<data>
HTTP/1.1 301 redirect swsbounce
Content-Length: 0
Location: http://%HOSTIP:%HTTPPORT/%TESTNUMBER
Part: data
</data>
<data1>
HTTP/1.1 301 redirect swsbounce
Content-Length: 0
Location: http://%HOSTIP:%HTTPPORT/%TESTNUMBER
Part: data1
</data1>
<data2>
HTTP/1.1 301 redirect swsbounce
Content-Length: 0
Location: http://%HOSTIP:%HTTPPORT/%TESTNUMBER
Part: data2
</data2>
<data3>
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 30
Part: data3
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
</data3>
<datacheck>
HTTP/1.1 301 redirect swsbounce
Content-Length: 0
Location: http://%HOSTIP:%HTTPPORT/%TESTNUMBER
Part: data
HTTP/1.1 301 redirect swsbounce
Content-Length: 0
Location: http://%HOSTIP:%HTTPPORT/%TESTNUMBER
Part: data1
HTTP/1.1 301 redirect swsbounce
Content-Length: 0
Location: http://%HOSTIP:%HTTPPORT/%TESTNUMBER
Part: data2
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 30
Part: data3
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
</datacheck>
</reply>
# Client-side
<client>
<server>
http
</server>
# This is a test of the swsbounce keyword which is used during tests to
# override the data response number for the next request to the previous
# data response number + 1. eg data, data1, data2 etc.
<name>
HTTP redirect loop 3x swsbounce test
</name>
<command>
--location http://%HOSTIP:%HTTPPORT/%TESTNUMBER
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<protocol crlf="yes">
GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
</protocol>
</verify>
</testcase>