2023-03-06 07:19:35 +08:00
|
|
|
<testcase>
|
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
HTTP
|
|
|
|
HTTP GET
|
2023-03-09 01:00:05 +08:00
|
|
|
cookies
|
2023-03-06 07:19:35 +08:00
|
|
|
</keywords>
|
|
|
|
</info>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Server-side
|
|
|
|
<reply>
|
|
|
|
<data crlf="yes">
|
|
|
|
HTTP/1.1 200 OK
|
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
|
|
|
Accept-Ranges: bytes
|
|
|
|
Content-Length: 6
|
|
|
|
Content-Type: text/html
|
|
|
|
Set-Cookie: mycookie=; Max-Age=-1; Expires=Thu, 01 Jan 1970 00:00:00 GMT
|
|
|
|
Set-Cookie: mycookie3=; Path=/func_test; Max-Age=-1; Expires=Thu, 01 Jan 1970 00:00:00 GMT
|
|
|
|
Set-Cookie: mycookie4=; Path=/func_test; Max-Age=-1; Expires=Thu, 01 Jan 1970 00:00:
|
|
|
|
Set-Cookie: mycookie5=; Path=/func_test; Max-Age=-1; Expires=Thu, 01 Jan 1970 00:00:00 GMT
|
|
|
|
Set-Cookie: mycookie6=; Path=/func_test; Max-Age=-1; Expires=Thu, 01 Jan 1970 00:00:00 GMT
|
|
|
|
Set-Cookie: mycookie1=; Path=/; Max-Age=-1; Expires=Thu, 01 Jan 1970 00:00:00 GMT
|
|
|
|
|
|
|
|
-foo-
|
|
|
|
</data>
|
|
|
|
</reply>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Client-side
|
|
|
|
<client>
|
|
|
|
<server>
|
|
|
|
http
|
|
|
|
</server>
|
|
|
|
<name>
|
2023-05-22 05:27:43 +08:00
|
|
|
Setting cookies set with expired dates that were loaded from jar
|
2023-03-06 07:19:35 +08:00
|
|
|
</name>
|
|
|
|
<command>
|
2023-03-29 09:20:54 +08:00
|
|
|
http://%HOSTIP:%HTTPPORT/func_test/del_cookie -b %LOGDIR/cookie%TESTNUMBER -c %LOGDIR/save%TESTNUMBER
|
2023-03-06 07:19:35 +08:00
|
|
|
</command>
|
2023-03-29 09:20:54 +08:00
|
|
|
<file name="%LOGDIR/cookie%TESTNUMBER" mode="text">
|
2023-03-06 07:19:35 +08:00
|
|
|
%HOSTIP FALSE /func_test FALSE 1709598616 mycookie6 991
|
|
|
|
#HttpOnly_%HOSTIP FALSE /func_test FALSE 1709598616 mycookie5 990
|
|
|
|
#HttpOnly_%HOSTIP FALSE /func_test FALSE 1709598616 mycookie4 950
|
|
|
|
#HttpOnly_%HOSTIP FALSE /func_test FALSE 1709598616 mycookie3 900
|
|
|
|
#HttpOnly_%HOSTIP FALSE /func_test/ FALSE 1709598616 mycookie2 5900
|
|
|
|
#HttpOnly_%HOSTIP FALSE / FALSE 1709598616 mycookie1 4900
|
|
|
|
#HttpOnly_%HOSTIP FALSE /func_test/ FALSE 0 mycookie 1200
|
|
|
|
</file>
|
2023-03-09 18:29:56 +08:00
|
|
|
<features>
|
|
|
|
cookies
|
|
|
|
</features>
|
2023-03-06 07:19:35 +08:00
|
|
|
</client>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
|
|
|
<protocol crlf="yes">
|
|
|
|
GET /func_test/del_cookie HTTP/1.1
|
|
|
|
Host: %HOSTIP:%HTTPPORT
|
|
|
|
User-Agent: curl/%VERSION
|
|
|
|
Accept: */*
|
|
|
|
Cookie: mycookie2=5900; mycookie=1200; mycookie3=900; mycookie4=950; mycookie5=990; mycookie6=991; mycookie1=4900
|
|
|
|
|
|
|
|
</protocol>
|
2023-03-29 09:20:54 +08:00
|
|
|
<file name="%LOGDIR/save%TESTNUMBER" mode="text">
|
2023-03-06 07:19:35 +08:00
|
|
|
# Netscape HTTP Cookie File
|
|
|
|
# https://curl.se/docs/http-cookies.html
|
|
|
|
# This file was generated by libcurl! Edit at your own risk.
|
|
|
|
|
|
|
|
#HttpOnly_127.0.0.1 FALSE /func_test/ FALSE 1709598616 mycookie2 5900
|
|
|
|
</file>
|
|
|
|
</verify>
|
|
|
|
</testcase>
|