aboutsummaryrefslogtreecommitdiff
path: root/tests/data
diff options
context:
space:
mode:
authorYAMADA Yasuharu <yasuharu.yamada@access-company.com>2013-09-17 15:51:22 +0900
committerDaniel Stenberg <daniel@haxx.se>2013-09-17 23:25:56 +0200
commit4cfbb201c4f823ba31ba4b895044088fba6ae535 (patch)
treedbb7293836bee3126e71f575a2381e3df3d05579 /tests/data
parentdc016567ced8d8e75fe45763f3a54ca483a1c7a2 (diff)
cookies: add expiration
Implement: Expired Cookies These following situation, curl removes cookie(s) from struct CookieInfo if the cookie expired. - Curl_cookie_add() - Curl_cookie_getlist() - cookie_output()
Diffstat (limited to 'tests/data')
-rw-r--r--tests/data/Makefile.am2
-rw-r--r--tests/data/test141572
2 files changed, 73 insertions, 1 deletions
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index d11ce61a3..edbdbf5e2 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -112,7 +112,7 @@ test1388 test1389 test1390 test1391 test1392 test1393 test1394 test1395 \
test1396 \
\
test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \
-test1408 test1409 test1410 test1412 test1413 test1414 \
+test1408 test1409 test1410 test1412 test1413 test1414 test1415 \
\
test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \
test1508 test1509 test1510 test1511 test1512 \
diff --git a/tests/data/test1415 b/tests/data/test1415
new file mode 100644
index 000000000..cc6bd70e7
--- /dev/null
+++ b/tests/data/test1415
@@ -0,0 +1,72 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+cookies
+cookiejar
+delete expired cookie
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 4
+Content-Type: text/html
+Funny-head: yesyes
+Set-Cookie: test1value=test1; domain=example.com; path=/;
+Set-Cookie: test2value=test2; expires=Friday, 01-Jan-2038 00:00:00 GMT; domain=example.com; path=/;
+Set-Cookie: test3value=test3; expires=Monday, 13-Jun-1988 03:04:55 GMT; domain=example.com; path=/;
+Set-Cookie: test4value=test4; expires=Friday, 01-Jan-2038 00:00:00 GMT; domain=example.com; path=/;
+Set-Cookie: test5value=test5; expires=Monday, 13-Jun-1988 03:04:55 GMT; domain=example.com; path=/;
+Set-Cookie: test6value=test6; expires=Monday, 13-Jun-1988 03:04:55 GMT; domain=example.com; path=/;
+Set-Cookie: test7value=test7; expires=Friday, 01-Jan-2038 00:00:00 GMT; domain=example.com; path=/;
+Set-Cookie: test8value=test8; expires=Monday, 13-Jun-1988 03:04:55 GMT; domain=example.com; path=/;
+
+boo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+Delete expired cookies
+</name>
+<setenv>
+TZ=GMT
+</setenv>
+<command>
+http://example.com/we/want/1415 -b none -c log/jar1415.txt -x %HOSTIP:%HTTPPORT
+</command>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET http://example.com/we/want/1415 HTTP/1.1
+Host: example.com
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+</protocol>
+
+<file name="log/jar1415.txt" mode="text">
+# Netscape HTTP Cookie File
+# http://curl.haxx.se/docs/http-cookies.html
+# This file was generated by libcurl! Edit at your own risk.
+
+.example.com TRUE / FALSE 0 test1value test1
+.example.com TRUE / FALSE 2145916800 test2value test2
+.example.com TRUE / FALSE 2145916800 test4value test4
+.example.com TRUE / FALSE 2145916800 test7value test7
+</file>
+</verify>
+</testcase>