mirror of
https://github.com/curl/curl.git
synced 2026-04-11 12:01:42 +08:00
To formalize they are now XML-compliant (with some asterisks.) Also to help syntax highlighters work on them to make their content more readable. Also: - Delete empty comment decorations. - GHA/checksrc: simplify XML check. - runtests: fail to load test data with XML prolog missing. Follow-up tobfe6eb1c06#19927 Follow-up to87ba80a6dfCloses #19946
74 lines
1.5 KiB
XML
74 lines
1.5 KiB
XML
<?xml version="1.0" encoding="US-ASCII"?>
|
|
<testcase>
|
|
<info>
|
|
<keywords>
|
|
HTTP
|
|
HTTP POST
|
|
--libcurl
|
|
</keywords>
|
|
</info>
|
|
|
|
# Server-side
|
|
<reply>
|
|
<data>
|
|
HTTP/1.1 200 OK
|
|
Date: Thu, 29 Jul 2008 14:49:00 GMT
|
|
Server: test-server/fake
|
|
Content-Length: 0
|
|
Content-Type: text/plain
|
|
Connection: close
|
|
|
|
</data>
|
|
</reply>
|
|
|
|
# Client-side
|
|
<client>
|
|
<server>
|
|
http
|
|
</server>
|
|
<name>
|
|
--libcurl for POST with binary content
|
|
</name>
|
|
<setenv>
|
|
SSL_CERT_FILE
|
|
</setenv>
|
|
<command>
|
|
http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER --libcurl %LOGDIR/test%TESTNUMBER.c --data-binary @%LOGDIR/%TESTNUMBER-upload
|
|
</command>
|
|
# "ab\x81""cd\0e\\\"?\r\n\t\x01""fghi%x1Ajklm%xFD"
|
|
<file name="%LOGDIR/%TESTNUMBER-upload" nonewline="yes">
|
|
%hex[ab%81cd%00e\"?%0D%0A%09%01fghi%1Ajklm%FD]hex%
|
|
</file>
|
|
<features>
|
|
--libcurl
|
|
</features>
|
|
</client>
|
|
|
|
# Verify data after the test has been "shot"
|
|
<verify>
|
|
<protocol crlf="yes" nonewline="yes">
|
|
POST /we/want/%TESTNUMBER HTTP/1.1
|
|
Host: %HOSTIP:%HTTPPORT
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
Content-Length: 24
|
|
Content-Type: application/x-www-form-urlencoded
|
|
|
|
%hex[ab%81cd%00e\"?%0D%0A%09%01fghi%1Ajklm%FD]hex%
|
|
</protocol>
|
|
<stripfile>
|
|
# CURLOPT_SSL_VERIFYPEER, SSH_KNOWNHOSTS and HTTP_VERSION vary with
|
|
# configurations - just ignore them
|
|
$_ = '' if /CURLOPT_SSL_VERIFYPEER/
|
|
$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
|
|
$_ = '' if /CURLOPT_HTTP_VERSION/
|
|
$_ = '' if /CURLOPT_INTERLEAVEDATA/
|
|
$_ = '' if /CURLOPT_SSLVERSION/
|
|
$_ = '' if /CURLOPT_TIMEOUT_MS/
|
|
</stripfile>
|
|
<file name="%LOGDIR/test%TESTNUMBER.c" mode="text">
|
|
%includetext %SRCDIR/data/data%TESTNUMBER.c%
|
|
</file>
|
|
</verify>
|
|
</testcase>
|