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