1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00
curl/tests/data/test287
Daniel Stenberg 1e29d275c6 test1509: verify proxy header response headers count
Modified sws to support and use custom CONNECT responses instead of the
previously naive hard-coded version. Made the HTTP test server able to
extract test case number from the host name in a CONNECT request by
finding the number after the last dot. It makes 'machine.moo.123' use
test case 123.

Adapted a larger amount of tests to the new <connect> style.

Bug: http://curl.haxx.se/bug/view.cgi?id=1204
Reported by: Martin Jansen
2013-03-27 15:30:46 +01:00

54 lines
880 B
Plaintext

<testcase>
<info>
<keywords>
HTTP
HTTP CONNECT
HTTP proxy
proxytunnel
</keywords>
</info>
# Server-side
<reply>
<connect nocheck="yes">
HTTP/1.1 405 Method Not Allowed swsclose
And you should ignore this data.
</connect>
</reply>
# Client-side
<client>
<server>
http
</server>
<name>
HTTP proxy CONNECT with custom User-Agent header
</name>
<command>
http://test.remote.example.com.287:%HTTPPORT/path/287 -H "User-Agent: looser/2007" --proxy http://%HOSTIP:%HTTPPORT --proxytunnel
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<protocol>
CONNECT test.remote.example.com.287:%HTTPPORT HTTP/1.1
Host: test.remote.example.com.287:%HTTPPORT
Proxy-Connection: Keep-Alive
User-Agent: looser/2007
</protocol>
# CURLE_RECV_ERROR
<errorcode>
56
</errorcode>
<stdout>
HTTP/1.1 405 Method Not Allowed swsclose
</stdout>
</verify>
</testcase>