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