You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2020/02/22 17:30:32 UTC

svn commit: r1874392 - /httpd/test/framework/trunk/t/modules/usertrack.t

Author: covener
Date: Sat Feb 22 17:30:32 2020
New Revision: 1874392

URL: http://svn.apache.org/viewvc?rev=1874392&view=rev
Log:
regression test to avoid new cookie attrs showing up



Modified:
    httpd/test/framework/trunk/t/modules/usertrack.t

Modified: httpd/test/framework/trunk/t/modules/usertrack.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/usertrack.t?rev=1874392&r1=1874391&r2=1874392&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/modules/usertrack.t (original)
+++ httpd/test/framework/trunk/t/modules/usertrack.t Sat Feb 22 17:30:32 2020
@@ -15,7 +15,7 @@ my @testcases = (
 my $iters = 100;
 my %cookiex = ();
 
-plan tests => (scalar (@testcases) * 2 + 2) * $iters + 1, need 'mod_usertrack';
+plan tests => (scalar (@testcases) * 2 + 2) * $iters + 1 + 3, need 'mod_usertrack';
 
 foreach (1..$iters) {
     my $nb_req = 1;
@@ -60,3 +60,15 @@ foreach (1..$iters) {
 
 # Check the overall number of cookies generated
 ok ((scalar (keys %cookiex)) == ($iters * 2));
+
+# Check that opt-in flags aren't set
+my $r = GET("/modules/usertrack/foo.html");
+ok t_cmp($r->code, 200, "Checking return code is '200'");
+# Checking for content
+my $setcookie = $r->header('Set-Cookie');
+t_debug("$setcookie");
+ok defined $setcookie;
+$setcookie =~ m/(Secure|HTTPonly|SameSite)/i;
+ok t_cmp($1, undef);
+
+