1<testcase> 2<info> 3<keywords> 4HTTP 5HTTP GET 6cookies 7cookiejar 8HTTP replaced headers 9httponly 10</keywords> 11</info> 12# Server-side 13<reply> 14<data> 15HTTP/1.1 200 OK 16Date: Tue, 09 Nov 2010 14:49:00 GMT 17Server: test-server/fake 18Content-Type: text/html 19Funny-head: yesyes 20%if large-time 21Set-Cookie: test=yes; httponly; domain=foo.com; expires=Fri Feb 13 11:56:27 GMT 2525 22SET-COOKIE: test2=yes; domain=host.foo.com; expires=Fri Feb 13 11:56:27 GMT 2525 23%else 24Set-Cookie: test=yes; httponly; domain=foo.com; expires=Fri Feb 13 11:56:27 GMT 2037 25SET-COOKIE: test2=yes; domain=host.foo.com; expires=Fri Feb 13 11:56:27 GMT 2037 26%endif 27Set-Cookie: test3=maybe; domain=foo.com; path=/moo; secure 28Set-Cookie: test4=no; domain=nope.foo.com; path=/moo; secure 29Set-Cookie: test5=name; domain=anything.com; path=/ ; secure 30Set-Cookie: fake=fooledyou; domain=..com; path=/; 31Set-Cookie: supercookie=fooledyou; domain=.com; path=/; 32Content-Length: 4 33 34boo 35</data> 36</reply> 37 38# Client-side 39<client> 40<server> 41http 42</server> 43<name> 44HTTP with various cookies and custom Host: 45</name> 46# Explicitly set the time zone to a known good one, in case the user is 47# using one of the 'right' zones that take into account leap seconds 48# which causes the cookie expiry times to be different. 49<setenv> 50TZ=GMT 51</setenv> 52<command> 53http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -c %LOGDIR/jar%TESTNUMBER.txt -H "Host: www.host.foo.com" 54</command> 55<features> 56cookies 57</features> 58</client> 59 60# Verify data after the test has been "shot" 61<verify> 62<protocol> 63GET /we/want/%TESTNUMBER HTTP/1.1 64Host: www.host.foo.com 65User-Agent: curl/%VERSION 66Accept: */* 67 68</protocol> 69<file name="%LOGDIR/jar%TESTNUMBER.txt" mode="text"> 70# Netscape HTTP Cookie File 71# https://curl.se/docs/http-cookies.html 72# This file was generated by libcurl! Edit at your own risk. 73 74%if large-time 75.host.foo.com TRUE /we/want/ FALSE 17517902187 test2 yes 76#HttpOnly_.foo.com TRUE /we/want/ FALSE 17517902187 test yes 77%else 78.host.foo.com TRUE /we/want/ FALSE 2118138987 test2 yes 79#HttpOnly_.foo.com TRUE /we/want/ FALSE 2118138987 test yes 80%endif 81</file> 82</verify> 83</testcase> 84