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