You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by GitBox <gi...@apache.org> on 2020/11/18 11:31:23 UTC

[GitHub] [tomcat] martin-g commented on a change in pull request #377: Set "Secure" session cookie attribute if called under SSL.

martin-g commented on a change in pull request #377:
URL: https://github.com/apache/tomcat/pull/377#discussion_r526015818



##########
File path: test/org/apache/catalina/valves/TestLoadBalancerDrainingValve.java
##########
@@ -238,6 +238,8 @@ private void runValve(String jkActivation,
                 expectedCookie.setPath(cookieConfig.getPath());
                 expectedCookie.setMaxAge(0);
 
+                EasyMock.expect(request.isSecure()).andReturn(true);

Review comment:
       Actually, I think we need a second test method to have coverage for the `cookieConfig.isSecure()` case. E.g. `runValve()` could have an additional boolean/enum parameter that decides whether to prepare `request.isSecure()` or `cookieConfig.isSecure()`.
   
   In addition I don't see any new code that verifies that the `expectedCookie` has `isSecure() == true`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org