mirror of
https://github.com/moparisthebest/curl
synced 2024-11-14 05:25:06 -05:00
1e29d275c6
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
54 lines
880 B
Plaintext
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>
|