xref: /curl/tests/data/test1517 (revision 3fd80c7b)
1<testcase>
2<info>
3<keywords>
4HTTP
5POST
6POST callback
7slow callback
8early 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>
22skip: 45
23</servercmd>
24<data>
25HTTP/1.1 500 Internal Server Error
26Date: Thu, 17 Mar 2016 14:41:00 GMT
27Server: test-server/fake
28Content-Type: text/plain; charset=US-ASCII
29X-Special: swsclose
30Content-Length: 55
31Connection: close
32
33This is a virtual description of server virtual error.
34</data>
35</reply>
36
37# Client-side
38<client>
39<server>
40http
41</server>
42# tool is what to use instead of 'curl'
43<tool>
44lib%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>
53HTTP POST, server responds before completed send
54</name>
55<command>
56http://%HOSTIP:%HTTPPORT/%TESTNUMBER
57</command>
58</client>
59
60#
61# Verify data after the test has been "shot"
62<verify>
63<strippart>
64s/^(this is what we post to the silly web server)(\r)?\n//
65</strippart>
66<protocol>
67POST /%TESTNUMBER HTTP/1.1
68Host: %HOSTIP:%HTTPPORT
69Accept: */*
70Content-Length: 45
71Content-Type: application/x-www-form-urlencoded
72
73</protocol>
74<errorcode>
750
76</errorcode>
77</verify>
78</testcase>
79