test420 (2149B)
1 <testcase> 2 <info> 3 <keywords> 4 HTTP 5 HTTP GET 6 cookies 7 </keywords> 8 </info> 9 10 # 11 # Server-side 12 <reply> 13 <data crlf="yes"> 14 HTTP/1.1 200 OK 15 Date: Tue, 09 Nov 2010 14:49:00 GMT 16 Accept-Ranges: bytes 17 Content-Length: 6 18 Content-Type: text/html 19 Set-Cookie: mycookie=; Max-Age=-1; Expires=Thu, 01 Jan 1970 00:00:00 GMT 20 Set-Cookie: mycookie3=; Path=/func_test; Max-Age=-1; Expires=Thu, 01 Jan 1970 00:00:00 GMT 21 Set-Cookie: mycookie4=; Path=/func_test; Max-Age=-1; Expires=Thu, 01 Jan 1970 00:00: 22 Set-Cookie: mycookie5=; Path=/func_test; Max-Age=-1; Expires=Thu, 01 Jan 1970 00:00:00 GMT 23 Set-Cookie: mycookie6=; Path=/func_test; Max-Age=-1; Expires=Thu, 01 Jan 1970 00:00:00 GMT 24 Set-Cookie: mycookie1=; Path=/; Max-Age=-1; Expires=Thu, 01 Jan 1970 00:00:00 GMT 25 26 -foo- 27 </data> 28 </reply> 29 30 # 31 # Client-side 32 <client> 33 <server> 34 http 35 </server> 36 <name> 37 Setting cookies set with expired dates that were loaded from jar 38 </name> 39 <command> 40 http://%HOSTIP:%HTTPPORT/func_test/del_cookie -b %LOGDIR/cookie%TESTNUMBER -c %LOGDIR/save%TESTNUMBER 41 </command> 42 <file name="%LOGDIR/cookie%TESTNUMBER" mode="text"> 43 %HOSTIP FALSE /func_test FALSE 21709598616 mycookie6 991 44 #HttpOnly_%HOSTIP FALSE /func_test FALSE 21709598616 mycookie5 990 45 #HttpOnly_%HOSTIP FALSE /func_test FALSE 21709598616 mycookie4 950 46 #HttpOnly_%HOSTIP FALSE /func_test FALSE 21709598616 mycookie3 900 47 #HttpOnly_%HOSTIP FALSE /func_test/ FALSE 21709598616 mycookie2 5900 48 #HttpOnly_%HOSTIP FALSE / FALSE 21709598616 mycookie1 4900 49 #HttpOnly_%HOSTIP FALSE /func_test/ FALSE 0 mycookie 1200 50 </file> 51 <features> 52 cookies 53 </features> 54 </client> 55 56 # 57 # Verify data after the test has been "shot" 58 <verify> 59 <protocol crlf="yes"> 60 GET /func_test/del_cookie HTTP/1.1 61 Host: %HOSTIP:%HTTPPORT 62 User-Agent: curl/%VERSION 63 Accept: */* 64 Cookie: mycookie2=5900; mycookie=1200; mycookie3=900; mycookie4=950; mycookie5=990; mycookie6=991; mycookie1=4900 65 66 </protocol> 67 <file name="%LOGDIR/save%TESTNUMBER" mode="text"> 68 # Netscape HTTP Cookie File 69 # https://curl.se/docs/http-cookies.html 70 # This file was generated by libcurl! Edit at your own risk. 71 72 #HttpOnly_127.0.0.1 FALSE /func_test/ FALSE 21709598616 mycookie2 5900 73 </file> 74 </verify> 75 </testcase>