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
69 lines
1.5 KiB
XML
69 lines
1.5 KiB
XML
<?xml version="1.0" encoding="US-ASCII"?>
|
|
<testcase>
|
|
<info>
|
|
<keywords>
|
|
HTTP
|
|
HTTP POST
|
|
cookies
|
|
cookiejar
|
|
</keywords>
|
|
</info>
|
|
|
|
# Server-side
|
|
<reply>
|
|
<data crlf="headers">
|
|
HTTP/1.1 200 OK
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
|
Server: test-server/fake
|
|
Content-Type: text/html
|
|
Funny-head: yesyes swsclose
|
|
Set-Cookie: foobar=name;
|
|
Set-Cookie: mismatch=this; domain=127.0.0.1; path="/silly/";
|
|
Set-Cookie: partmatch=present; domain=.0.0.1; path=/;
|
|
Set-Cookie: foo%TABbar=barfoo
|
|
Set-Cookie: bar%TABfoo=
|
|
Set-Cookie: bar=foo%TABbar
|
|
|
|
</data>
|
|
</reply>
|
|
|
|
# Client-side
|
|
<client>
|
|
<server>
|
|
http
|
|
</server>
|
|
<name>
|
|
HTTP with cookie parser and header recording
|
|
</name>
|
|
<command>
|
|
"http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER?parm1=this*that/other/thing%AMPparm2=foobar/%TESTNUMBER" -c %LOGDIR/cookie%TESTNUMBER.txt -d "userid=myname%AMPpassword=mypassword"
|
|
</command>
|
|
<features>
|
|
cookies
|
|
local-http
|
|
</features>
|
|
</client>
|
|
|
|
# Verify data after the test has been "shot"
|
|
<verify>
|
|
<protocol crlf="yes" nonewline="yes">
|
|
POST /we/want/%TESTNUMBER?parm1=this*that/other/thing%AMPparm2=foobar/%TESTNUMBER HTTP/1.1
|
|
Host: %HOSTIP:%HTTPPORT
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
Content-Length: 33
|
|
Content-Type: application/x-www-form-urlencoded
|
|
|
|
userid=myname%AMPpassword=mypassword
|
|
</protocol>
|
|
<file name="%LOGDIR/cookie%TESTNUMBER.txt" mode="text">
|
|
# Netscape HTTP Cookie File
|
|
# https://curl.se/docs/http-cookies.html
|
|
# This file was generated by libcurl! Edit at your own risk.
|
|
|
|
127.0.0.1 FALSE /silly FALSE 0 mismatch this
|
|
127.0.0.1 FALSE /we/want FALSE 0 foobar name
|
|
</file>
|
|
</verify>
|
|
</testcase>
|