| 1 |
<testcase> |
| 2 |
<info> |
| 3 |
<keywords> |
| 4 |
HTTP |
| 5 |
HTTP POST |
| 6 |
HTTP CONNECT |
| 7 |
HTTP proxy |
| 8 |
HTTP proxy NTLM auth |
| 9 |
</keywords> |
| 10 |
</info> |
| 11 |
|
| 12 |
# Server-side |
| 13 |
<reply> |
| 14 |
<data> |
| 15 |
HTTP/1.1 200 We are fine and cool |
| 16 |
Server: Apache/1.3.27 (Dorw1n) PHP/44.1.2 |
| 17 |
Content-Length: 27 |
| 18 |
|
| 19 |
This is all fine and dandy |
| 20 |
</data> |
| 21 |
|
| 22 |
# This is the CONNECT response |
| 23 |
<connect1001> |
| 24 |
HTTP/1.1 200 We are fine and cool |
| 25 |
Server: Apache/1.3.27 (Dorw1n) PHP/44.1.2 |
| 26 |
|
| 27 |
</connect1001> |
| 28 |
|
| 29 |
<datacheck> |
| 30 |
HTTP/1.1 200 We are fine and cool |
| 31 |
Server: Apache/1.3.27 (Dorw1n) PHP/44.1.2 |
| 32 |
|
| 33 |
HTTP/1.1 200 We are fine and cool |
| 34 |
Server: Apache/1.3.27 (Dorw1n) PHP/44.1.2 |
| 35 |
Content-Length: 27 |
| 36 |
|
| 37 |
This is all fine and dandy |
| 38 |
</datacheck> |
| 39 |
</reply> |
| 40 |
|
| 41 |
# Client-side |
| 42 |
<client> |
| 43 |
<server> |
| 44 |
https |
| 45 |
</server> |
| 46 |
<features> |
| 47 |
NTLM |
| 48 |
SSL |
| 49 |
!SSPI |
| 50 |
</features> |
| 51 |
<name> |
| 52 |
HTTP POST using CONNECT with --proxy-ntlm but no auth is required |
| 53 |
</name> |
| 54 |
<command> |
| 55 |
http://test.a.galaxy.far.far.away.1097:%HTTPPORT/1097 --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-ntlm -d "dummy=value" -p |
| 56 |
</command> |
| 57 |
</client> |
| 58 |
|
| 59 |
# Verify data after the test has been "shot" |
| 60 |
<verify> |
| 61 |
<strip> |
| 62 |
^User-Agent: curl/.* |
| 63 |
</strip> |
| 64 |
<protocol nonewline="yes"> |
| 65 |
CONNECT test.a.galaxy.far.far.away.1097:%HTTPPORT HTTP/1.1 |
| 66 |
Host: test.a.galaxy.far.far.away.1097:%HTTPPORT |
| 67 |
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= |
| 68 |
User-Agent: curl/7.19.5-CVS (i686-pc-linux-gnu) libcurl/7.19.5-CVS OpenSSL/0.9.8g zlib/1.2.3.3 c-ares/1.6.1-CVS libidn/1.12 libssh2/1.0.1_CVS |
| 69 |
Proxy-Connection: Keep-Alive |
| 70 |
|
| 71 |
POST /1097 HTTP/1.1 |
| 72 |
User-Agent: curl/7.19.5-CVS (i686-pc-linux-gnu) libcurl/7.19.5-CVS OpenSSL/0.9.8g zlib/1.2.3.3 c-ares/1.6.1-CVS libidn/1.12 libssh2/1.0.1_CVS |
| 73 |
Host: test.a.galaxy.far.far.away.1097:%HTTPPORT |
| 74 |
Accept: */* |
| 75 |
Content-Length: 11 |
| 76 |
Content-Type: application/x-www-form-urlencoded |
| 77 |
|
| 78 |
dummy=value |
| 79 |
</protocol> |
| 80 |
|
| 81 |
</verify> |
| 82 |
</testcase> |