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