mirror of
https://github.com/curl/curl.git
synced 2026-08-24 16:53:34 +03:00
Allow test server to handle binary POSTs.
Tests 35, 544 545 added: binary data POSTs.
This commit is contained in:
parent
b7dd186d36
commit
0678a51d3b
8 changed files with 125 additions and 9 deletions
|
|
@ -45,7 +45,8 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \
|
|||
test706 test707 test350 test351 test352 test353 test289 test540 test354 \
|
||||
test231 test1000 test1001 test1002 test1003 test1004 test1005 test1006 \
|
||||
test615 test1007 test541 test1010 test1011 test1012 test542 test543 \
|
||||
test536 test1008 test1009 test2000 test2001 test2002 test2003
|
||||
test536 test1008 test1009 test2000 test2001 test2002 test2003 test35 \
|
||||
test544 test545
|
||||
|
||||
filecheck:
|
||||
@mkdir test-place; \
|
||||
|
|
|
|||
BIN
tests/data/test35
Normal file
BIN
tests/data/test35
Normal file
Binary file not shown.
49
tests/data/test544
Normal file
49
tests/data/test544
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<testcase>
|
||||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<data mode="text">
|
||||
HTTP/1.1 200 OK swsclose
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake
|
||||
Content-Length: 3
|
||||
|
||||
OK
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
http
|
||||
</server>
|
||||
# tool is what to use instead of 'curl'
|
||||
<tool>
|
||||
lib544
|
||||
</tool>
|
||||
|
||||
<name>
|
||||
HTTP POST text data using CURLOPT_COPYPOSTFIELDS
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/544
|
||||
</command>
|
||||
</client>
|
||||
|
||||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<strip>
|
||||
^User-Agent:.*
|
||||
</strip>
|
||||
<protocol nonewline="yes">
|
||||
POST /544 HTTP/1.1
|
||||
Host: %HOSTIP:%HTTPPORT
|
||||
Accept: */*
|
||||
Content-Length: 4
|
||||
Content-Type: application/x-www-form-urlencoded
|
||||
|
||||
This
|
||||
</protocol>
|
||||
</verify>
|
||||
</testcase>
|
||||
BIN
tests/data/test545
Normal file
BIN
tests/data/test545
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue