test1517 (1606B)
1 <testcase> 2 <info> 3 <keywords> 4 HTTP 5 POST 6 POST callback 7 slow callback 8 early response 9 </keywords> 10 </info> 11 # 12 # This test checks to make sure curl can call recv() without failing after a 13 # send() fails on the same socket (#657). Most OSes should support this 14 # natively. On Windows there were reported problems and a workaround via 15 # define USE_RECV_BEFORE_SEND_WORKAROUND was added. 16 # This proved problematic in other cases and was removed again. 17 # 18 # Server-side 19 <reply> 20 # Force server reply right after request headers, not waiting for request body 21 <servercmd> 22 skip: 45 23 </servercmd> 24 <data> 25 HTTP/1.1 500 Internal Server Error 26 Date: Thu, 17 Mar 2016 14:41:00 GMT 27 Server: test-server/fake 28 Content-Type: text/plain; charset=US-ASCII 29 X-Special: swsclose 30 Content-Length: 55 31 Connection: close 32 33 This is a virtual description of server virtual error. 34 </data> 35 </reply> 36 37 # Client-side 38 <client> 39 <server> 40 http 41 </server> 42 # tool is what to use instead of 'curl' 43 <tool> 44 lib%TESTNUMBER 45 </tool> 46 # precheck is a command line to run before the test, to see if we can execute 47 # the test or not 48 <precheck> 49 ./libtest/lib%TESTNUMBER check 50 </precheck> 51 52 <name> 53 HTTP POST, server responds before completed send 54 </name> 55 <command> 56 http://%HOSTIP:%HTTPPORT/%TESTNUMBER 57 </command> 58 </client> 59 60 # 61 # Verify data after the test has been "shot" 62 <verify> 63 <strippart> 64 s/^(this is what we post to the silly web server)(\r)?\n// 65 </strippart> 66 <protocol> 67 POST /%TESTNUMBER HTTP/1.1 68 Host: %HOSTIP:%HTTPPORT 69 Accept: */* 70 Content-Length: 45 71 Content-Type: application/x-www-form-urlencoded 72 73 </protocol> 74 <errorcode> 75 0 76 </errorcode> 77 </verify> 78 </testcase>