| xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame] | 1 | <testcase> | 
 | 2 | <info> | 
 | 3 | <keywords> | 
 | 4 | HTTP | 
 | 5 | HTTP PUT | 
 | 6 | Expect | 
 | 7 | </keywords> | 
 | 8 | </info> | 
 | 9 | # Server-side | 
 | 10 | <reply> | 
 | 11 | # 417 means the server didn't like the Expect header | 
 | 12 | <data> | 
 | 13 | HTTP/1.1 417 OK swsbounce | 
 | 14 | Date: Tue, 09 Nov 2010 14:49:00 GMT | 
 | 15 | Server: test-server/fake | 
 | 16 | Content-Length: 0 | 
 | 17 |  | 
 | 18 | </data> | 
 | 19 | <data1> | 
 | 20 | HTTP/1.1 200 OK | 
 | 21 | Date: Tue, 09 Nov 2010 14:49:00 GMT | 
 | 22 | Server: test-server/fake | 
 | 23 | Content-Length: 10 | 
 | 24 |  | 
 | 25 | blablabla | 
 | 26 | </data1> | 
 | 27 | <datacheck> | 
 | 28 | HTTP/1.1 417 OK swsbounce | 
 | 29 | Date: Tue, 09 Nov 2010 14:49:00 GMT | 
 | 30 | Server: test-server/fake | 
 | 31 | Content-Length: 0 | 
 | 32 |  | 
 | 33 | HTTP/1.1 200 OK | 
 | 34 | Date: Tue, 09 Nov 2010 14:49:00 GMT | 
 | 35 | Server: test-server/fake | 
 | 36 | Content-Length: 10 | 
 | 37 |  | 
 | 38 | blablabla | 
 | 39 | </datacheck> | 
 | 40 | <servercmd> | 
 | 41 | no-expect | 
 | 42 | </servercmd> | 
 | 43 | </reply> | 
 | 44 |  | 
 | 45 | # Client-side | 
 | 46 | <client> | 
 | 47 | <server> | 
 | 48 | http | 
 | 49 | </server> | 
 | 50 |  <name> | 
 | 51 | HTTP PUT with Expect: 100-continue and 417 response | 
 | 52 |  </name> | 
 | 53 |  <command> | 
 | 54 | http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -T log/test%TESTNUMBER.txt | 
 | 55 | </command> | 
 | 56 | <file name="log/test%TESTNUMBER.txt"> | 
 | 57 | Weird | 
 | 58 |      file | 
 | 59 |          to | 
 | 60 |    upload | 
 | 61 | for | 
 | 62 |    testing | 
 | 63 | the | 
 | 64 |    PUT | 
 | 65 |       feature | 
 | 66 | </file> | 
 | 67 | </client> | 
 | 68 |  | 
 | 69 | # Verify data after the test has been "shot" | 
 | 70 | <verify> | 
 | 71 | <protocol> | 
 | 72 | PUT /we/want/%TESTNUMBER HTTP/1.1
 | 
 | 73 | Host: %HOSTIP:%HTTPPORT
 | 
 | 74 | User-Agent: curl/%VERSION
 | 
 | 75 | Accept: */*
 | 
 | 76 | Content-Length: 78
 | 
 | 77 | Expect: 100-continue
 | 
 | 78 | 
 | 
 | 79 | PUT /we/want/%TESTNUMBER HTTP/1.1
 | 
 | 80 | Host: %HOSTIP:%HTTPPORT
 | 
 | 81 | User-Agent: curl/%VERSION
 | 
 | 82 | Accept: */*
 | 
 | 83 | Content-Length: 78
 | 
 | 84 | 
 | 
 | 85 | Weird | 
 | 86 |      file | 
 | 87 |          to | 
 | 88 |    upload | 
 | 89 | for | 
 | 90 |    testing | 
 | 91 | the | 
 | 92 |    PUT | 
 | 93 |       feature | 
 | 94 | </protocol> | 
 | 95 | </verify> | 
 | 96 | </testcase> |