mirror of
https://github.com/curl/curl.git
synced 2025-01-06 13:44:52 +08:00
3fd80c7b59
The threee tags `<name>`, `</name>` and `<command>` were frequently used with a leading space that this removes. The reason this habbit is so widespread in testcases is probably that they have been copy and pasted. Hence, fixing them all now might curb this practice from now on. Closes #12028
79 lines
1.3 KiB
Plaintext
79 lines
1.3 KiB
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
HTTP
|
|
HTTP GET
|
|
HTTP proxy
|
|
followlocation
|
|
</keywords>
|
|
</info>
|
|
#
|
|
# Server-side
|
|
<reply>
|
|
<data>
|
|
HTTP/1.1 302 OK
|
|
Location: http://example.net/tes t case=/%TESTNUMBER0002
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
|
Content-Length: 0
|
|
|
|
</data>
|
|
<data2>
|
|
HTTP/1.1 200 OK
|
|
Location: this should be ignored
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
|
Content-Length: 5
|
|
|
|
body
|
|
</data2>
|
|
<datacheck>
|
|
HTTP/1.1 302 OK
|
|
Location: http://example.net/tes t case=/%TESTNUMBER0002
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
|
Content-Length: 0
|
|
|
|
HTTP/1.1 200 OK
|
|
Location: this should be ignored
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
|
Content-Length: 5
|
|
|
|
body
|
|
</datacheck>
|
|
</reply>
|
|
|
|
#
|
|
# Client-side
|
|
<client>
|
|
<server>
|
|
http
|
|
</server>
|
|
<name>
|
|
HTTP redirect with whitespace in absolute Location: URL
|
|
</name>
|
|
<command>
|
|
http://example.com/please/gimme/%TESTNUMBER -L -x http://%HOSTIP:%HTTPPORT
|
|
</command>
|
|
<features>
|
|
proxy
|
|
</features>
|
|
</client>
|
|
|
|
#
|
|
# Verify data after the test has been "shot"
|
|
<verify>
|
|
<protocol>
|
|
GET http://example.com/please/gimme/%TESTNUMBER HTTP/1.1
|
|
Host: example.com
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
Proxy-Connection: Keep-Alive
|
|
|
|
GET http://example.net/tes%20t%20case=/%TESTNUMBER0002 HTTP/1.1
|
|
Host: example.net
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
Proxy-Connection: Keep-Alive
|
|
|
|
</protocol>
|
|
</verify>
|
|
</testcase>
|