2007-01-23 10:25:56 +08:00
|
|
|
<testcase>
|
2003-10-07 22:43:48 +08:00
|
|
|
#
|
|
|
|
# Server-side
|
|
|
|
<reply>
|
2014-02-01 07:58:58 +08:00
|
|
|
<data>
|
|
|
|
HTTP/1.1 200 OK
|
|
|
|
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
|
|
|
Server: test-server/fake swsclose
|
|
|
|
Connection: close
|
|
|
|
Content-Type: text/html
|
|
|
|
|
2003-10-07 22:43:48 +08:00
|
|
|
hello
|
|
|
|
</data>
|
|
|
|
</reply>
|
|
|
|
|
|
|
|
# Client-side
|
|
|
|
<client>
|
|
|
|
<server>
|
|
|
|
http
|
|
|
|
</server>
|
|
|
|
# tool is what to use instead of 'curl'
|
|
|
|
<tool>
|
|
|
|
lib508
|
|
|
|
</tool>
|
|
|
|
|
|
|
|
<name>
|
|
|
|
send HTTP POST using read callback
|
|
|
|
</name>
|
|
|
|
<command>
|
2004-09-08 16:08:38 +08:00
|
|
|
http://%HOSTIP:%HTTPPORT/508
|
2003-10-07 22:43:48 +08:00
|
|
|
</command>
|
|
|
|
</client>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
2009-05-12 01:21:26 +08:00
|
|
|
<strippart>
|
|
|
|
# remove CR that CURLOPT_TRANSFERTEXT added, when CharConv enabled:
|
|
|
|
s/^(this is what we post to the silly web server)\r\n/$1\n/ if($has_charconv)
|
|
|
|
</strippart>
|
2003-10-07 22:43:48 +08:00
|
|
|
<protocol>
|
|
|
|
POST /508 HTTP/1.1
|
2007-09-15 03:32:31 +08:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2004-02-09 20:46:41 +08:00
|
|
|
Accept: */*
|
2003-10-07 22:43:48 +08:00
|
|
|
Content-Length: 45
|
|
|
|
Content-Type: application/x-www-form-urlencoded
|
|
|
|
|
|
|
|
this is what we post to the silly web server
|
|
|
|
</protocol>
|
|
|
|
</verify>
|
2007-01-23 10:25:56 +08:00
|
|
|
</testcase>
|