xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP PUT |
| 6 | chunked Transfer-Encoding |
| 7 | </keywords> |
| 8 | </info> |
| 9 | |
| 10 | # Server-side |
| 11 | <reply> |
| 12 | <data> |
| 13 | HTTP/1.0 200 OK swsclose
|
| 14 | Date: Tue, 09 Nov 2010 14:49:00 GMT
|
| 15 | Server: test-server/fake
|
| 16 |
|
| 17 | blablabla |
| 18 | |
| 19 | </data> |
| 20 | </reply> |
| 21 | |
| 22 | # Client-side |
| 23 | <client> |
| 24 | <server> |
| 25 | http |
| 26 | </server> |
| 27 | <name> |
| 28 | HTTP PUT from stdin with wrong content-length |
| 29 | </name> |
| 30 | <command> |
| 31 | http://%HOSTIP:%HTTPPORT/bzz/%TESTNUMBER -T - -H "Content-Length: 1" |
| 32 | </command> |
| 33 | <stdin> |
| 34 | more than one byte |
| 35 | </stdin> |
| 36 | </client> |
| 37 | |
| 38 | # Verify data after the test has been "shot" |
| 39 | <verify> |
| 40 | <protocol> |
| 41 | PUT /bzz/%TESTNUMBER HTTP/1.1
|
| 42 | Host: %HOSTIP:%HTTPPORT
|
| 43 | User-Agent: curl/%VERSION
|
| 44 | Accept: */*
|
| 45 | Transfer-Encoding: chunked
|
| 46 | %if !hyper |
| 47 | Content-Length: 1
|
| 48 | %endif |
| 49 | Expect: 100-continue
|
| 50 |
|
| 51 | 13
|
| 52 | more than one byte |
| 53 |
|
| 54 | 0
|
| 55 |
|
| 56 | </protocol> |
| 57 | </verify> |
| 58 | </testcase> |