curl-curl/tests/data/test1070
Viktor Szakats b5ea0736bb
tests/data: add XML prolog to test files
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 to bfe6eb1c06 #19927
Follow-up to 87ba80a6df

Closes #19946
2025-12-12 17:17:24 +01:00

62 lines
1.3 KiB
XML

<?xml version="1.0" encoding="US-ASCII"?>
<testcase>
<info>
<keywords>
HTTP
HTTP POST
</keywords>
</info>
# Server-side
<reply>
<data crlf="headers">
HTTP/1.1 403 Go away and swsclose
Server: test-server/fake
Content-Type: text/html
Content-Length: 55
Connection: close
you are not supposed to be allowed to send things here
</data>
<servercmd>
skip: 2300
</servercmd>
</reply>
# Client-side
<client>
<server>
http
</server>
<name>
HTTP POST with server closing connection before (all) data is received
</name>
<command>
-d @%LOGDIR/input%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER -H "Expect: 100-continue"
</command>
<file name="%LOGDIR/input%TESTNUMBER">
This creates the named file with this content before the test case is run,
which is useful if the test case needs a file to act on. We create this file
rather large (larger than your typical TCP packet) so that not all of it can nor
will be sent in one go as that is kind of the point of this test!
Here's 2000 x 'O':
%repeat[2000 x O]%
</file>
</client>
# Verify data after the test has been "shot"
<verify>
<protocol crlf="yes" nonewline="yes">
POST /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
Expect: 100-continue
Content-Length: 2313
Content-Type: application/x-www-form-urlencoded
This creates%SP
</protocol>
</verify>
</testcase>