| 1 |
<info> |
| 2 |
<keywords> |
| 3 |
HTTP |
| 4 |
HTTP FORMPOST |
| 5 |
HTTP replaced headers |
| 6 |
HTTP proxy |
| 7 |
HTTP proxy Digest auth |
| 8 |
</keywords> |
| 9 |
</info> |
| 10 |
# Server-side |
| 11 |
<reply> |
| 12 |
# The stupid test server doesn't response anything at all until the full |
| 13 |
# request has been sent, and then of course the full POST has already been |
| 14 |
# sent! |
| 15 |
<data> |
| 16 |
HTTP/1.1 407 no, tell me who you are first swsclose |
| 17 |
Date: Thu, 09 Nov 2010 14:49:00 GMT |
| 18 |
Server: test-server/fake |
| 19 |
Proxy-Authenticate: Digest realm="many secrets", nonce="911" |
| 20 |
Proxy-Connection: close |
| 21 |
Content-Length: 0 |
| 22 |
|
| 23 |
</data> |
| 24 |
<data1000> |
| 25 |
HTTP/1.1 200 A OK |
| 26 |
Server: Microsoft-IIS/6.0 |
| 27 |
Content-Type: text/html; charset=iso-8859-1 |
| 28 |
Content-Length: 3 |
| 29 |
|
| 30 |
ok |
| 31 |
</data1000> |
| 32 |
<datacheck> |
| 33 |
HTTP/1.1 407 no, tell me who you are first swsclose |
| 34 |
Date: Thu, 09 Nov 2010 14:49:00 GMT |
| 35 |
Server: test-server/fake |
| 36 |
Proxy-Authenticate: Digest realm="many secrets", nonce="911" |
| 37 |
Proxy-Connection: close |
| 38 |
Content-Length: 0 |
| 39 |
|
| 40 |
HTTP/1.1 200 A OK |
| 41 |
Server: Microsoft-IIS/6.0 |
| 42 |
Content-Type: text/html; charset=iso-8859-1 |
| 43 |
Content-Length: 3 |
| 44 |
|
| 45 |
ok |
| 46 |
</datacheck> |
| 47 |
|
| 48 |
</reply> |
| 49 |
|
| 50 |
# Client-side |
| 51 |
<client> |
| 52 |
<server> |
| 53 |
http |
| 54 |
</server> |
| 55 |
<name> |
| 56 |
HTTP POST multipart without Expect: header using proxy anyauth (Digest) |
| 57 |
</name> |
| 58 |
<command> |
| 59 |
-x http://%HOSTIP:%HTTPPORT http://remotehost:54321/we/want/258 -F name=daniel -F tool=curl -F file=@log/test258.txt -H 'Expect:' -U uuuser:pppassword --proxy-anyauth |
| 60 |
</command> |
| 61 |
# We create this file before the command is invoked! |
| 62 |
<file name="log/test258.txt"> |
| 63 |
foo- |
| 64 |
This is a moo- |
| 65 |
bar |
| 66 |
</file> |
| 67 |
</client> |
| 68 |
|
| 69 |
# Verify data after the test has been "shot" |
| 70 |
<verify> |
| 71 |
<strip> |
| 72 |
^(User-Agent:|Content-Type: multipart/form-data;|------).* |
| 73 |
</strip> |
| 74 |
<protocol> |
| 75 |
POST http://remotehost:54321/we/want/258 HTTP/1.1 |
| 76 |
User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3 |
| 77 |
Host: remotehost:54321 |
| 78 |
Pragma: no-cache |
| 79 |
Accept: */* |
| 80 |
Proxy-Connection: Keep-Alive |
| 81 |
Content-Length: 409 |
| 82 |
Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce |
| 83 |
|
| 84 |
------------------------------7c633d5c27ce |
| 85 |
Content-Disposition: form-data; name="name" |
| 86 |
|
| 87 |
daniel |
| 88 |
------------------------------7c633d5c27ce |
| 89 |
Content-Disposition: form-data; name="tool" |
| 90 |
|
| 91 |
curl |
| 92 |
------------------------------7c633d5c27ce |
| 93 |
Content-Disposition: form-data; name="file"; filename="test258.txt" |
| 94 |
Content-Type: text/plain |
| 95 |
|
| 96 |
foo- |
| 97 |
This is a moo- |
| 98 |
bar |
| 99 |
|
| 100 |
------------------------------7c633d5c27ce-- |
| 101 |
POST http://remotehost:54321/we/want/258 HTTP/1.1 |
| 102 |
User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3 |
| 103 |
Proxy-Authorization: Digest username="uuuser", realm="many secrets", nonce="911", uri="/we/want/258", response="2501654ca391f0b5c8c12a1da77e34cd" |
| 104 |
Host: remotehost:54321 |
| 105 |
Pragma: no-cache |
| 106 |
Accept: */* |
| 107 |
Proxy-Connection: Keep-Alive |
| 108 |
Content-Length: 409 |
| 109 |
Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce |
| 110 |
|
| 111 |
------------------------------7c633d5c27ce |
| 112 |
Content-Disposition: form-data; name="name" |
| 113 |
|
| 114 |
daniel |
| 115 |
------------------------------7c633d5c27ce |
| 116 |
Content-Disposition: form-data; name="tool" |
| 117 |
|
| 118 |
curl |
| 119 |
------------------------------7c633d5c27ce |
| 120 |
Content-Disposition: form-data; name="file"; filename="test258.txt" |
| 121 |
Content-Type: text/plain |
| 122 |
|
| 123 |
foo- |
| 124 |
This is a moo- |
| 125 |
bar |
| 126 |
|
| 127 |
------------------------------7c633d5c27ce-- |
| 128 |
</protocol> |
| 129 |
</verify> |