HTTP HTTP GET HTTP CONNECT HTTP proxy proxytunnel followlocation --write-out # Server-side # this is returned first since we get no proxy-auth HTTP/1.1 405 Method Not Allowed swsclose And you should ignore this data. # Client-side http HTTP proxy CONNECT to proxy returning 405 http://test.remote.example.com.%TESTNUMBER:%HTTPPORT/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxytunnel -w "%{http_code} %{http_connect}\n" proxy # Verify data after the test has been "shot" CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1 Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT User-Agent: curl/%VERSION Proxy-Connection: Keep-Alive # CURLE_RECV_ERROR 56 HTTP/1.1 405 Method Not Allowed swsclose 000 405