Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2013-04-05 01:46:20 -0400
committerGreg Wilkins2013-04-05 01:46:20 -0400
commit533cd57b53f8fbe9c0c9f8a19303517a0870658f (patch)
treefa9a50b80a9684c596132cc093f3ec0b323a9a2d /jetty-security/src/main
parent39d690ed2aa1b5e52104e1a3ff0e14816ba5cc27 (diff)
parentabcb4f163b7a21f0cb5949a49eb6409310797b52 (diff)
downloadorg.eclipse.jetty.project-533cd57b53f8fbe9c0c9f8a19303517a0870658f.tar.gz
org.eclipse.jetty.project-533cd57b53f8fbe9c0c9f8a19303517a0870658f.tar.xz
org.eclipse.jetty.project-533cd57b53f8fbe9c0c9f8a19303517a0870658f.zip
Merge remote-tracking branch 'origin/jetty-8'
Conflicts: jetty-security/src/main/java/org/eclipse/jetty/security/ConstraintSecurityHandler.java jetty-security/src/test/java/org/eclipse/jetty/security/ConstraintTest.java
Diffstat (limited to 'jetty-security/src/main')
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/ConstraintSecurityHandler.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/jetty-security/src/main/java/org/eclipse/jetty/security/ConstraintSecurityHandler.java b/jetty-security/src/main/java/org/eclipse/jetty/security/ConstraintSecurityHandler.java
index a606a0c08b..7878479bc4 100644
--- a/jetty-security/src/main/java/org/eclipse/jetty/security/ConstraintSecurityHandler.java
+++ b/jetty-security/src/main/java/org/eclipse/jetty/security/ConstraintSecurityHandler.java
@@ -696,6 +696,7 @@ public class ConstraintSecurityHandler extends SecurityHandler implements Constr
HttpConfiguration httpConfig = HttpChannel.getCurrentHttpChannel().getHttpConfiguration();
+
if (dataConstraint == UserDataConstraint.Confidential || dataConstraint == UserDataConstraint.Integral)
{
if (request.isSecure())
@@ -703,11 +704,13 @@ public class ConstraintSecurityHandler extends SecurityHandler implements Constr
if (httpConfig.getSecurePort() > 0)
{
- String url = httpConfig.getSecureScheme() + "://" + request.getServerName() + ":" + httpConfig.getSecurePort()
- + request.getRequestURI();
+ String scheme = httpConfig.getSecureScheme();
+ int port = httpConfig.getSecurePort();
+ String url = ("https".equalsIgnoreCase(scheme) && port==443)
+ ? "https://"+request.getServerName()+request.getRequestURI()
+ : scheme + "://" + request.getServerName() + ":" + port + request.getRequestURI();
if (request.getQueryString() != null)
url += "?" + request.getQueryString();
-
response.setContentLength(0);
response.sendRedirect(url);
}

Back to the top