Author: markt Date: Tue Dec 15 08:56:43 2015 New Revision: 1720092 URL: http://svn.apache.org/viewvc?rev=1720092&view=rev Log: Simplify logic. Expand comments.
Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1720092&r1=1720091&r2=1720092&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Tue Dec 15 08:56:43 2015 @@ -519,17 +519,17 @@ public class CoyoteAdapter implements Ad protected boolean postParseRequest(org.apache.coyote.Request req, Request request, org.apache.coyote.Response res, Response response) throws IOException, ServletException { - // If the processor has set the scheme (AJP will do this) use this to - // set the secure flag as well. If the processor hasn't set it, use the - // settings from the connector - if (! req.scheme().isNull()) { - // use processor specified scheme to determine secure state - request.setSecure(req.scheme().equals("https")); - } else { - // use connector scheme and secure configuration, (defaults to + // If the processor has set the scheme (AJP does this, HTTP does this if + // SSL is enabled) use this to set the secure flag as well. If the + // processor hasn't set it, use the settings from the connector + if (req.scheme().isNull()) { + // Use connector scheme and secure configuration, (defaults to // "http" and false respectively) req.scheme().setString(connector.getScheme()); request.setSecure(connector.getSecure()); + } else { + // Use processor specified scheme to determine secure state + request.setSecure(req.scheme().equals("https")); } // At this point the Host header has been processed. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org