You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by ja...@apache.org on 2007/10/24 16:57:48 UTC
svn commit: r587902 -
/lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/cms/cocoon/acting/SslRedirectAction.java
Author: jann
Date: Wed Oct 24 07:57:46 2007
New Revision: 587902
URL: http://svn.apache.org/viewvc?rev=587902&view=rev
Log:
If the request scheme is already https do not redirect again. This prevents a redirect loop. If you use mod_proxy than you have to ensure that requests are redirect to https://. Found no better solution for that redirect problem at the moment
Modified:
lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/cms/cocoon/acting/SslRedirectAction.java
Modified: lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/cms/cocoon/acting/SslRedirectAction.java
URL: http://svn.apache.org/viewvc/lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/cms/cocoon/acting/SslRedirectAction.java?rev=587902&r1=587901&r2=587902&view=diff
==============================================================================
--- lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/cms/cocoon/acting/SslRedirectAction.java (original)
+++ lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/cms/cocoon/acting/SslRedirectAction.java Wed Oct 24 07:57:46 2007
@@ -79,11 +79,11 @@
URLInformation info = new URLInformation(url);
String area = info.getCompleteArea();
- if (policy.isSSLProtected() && !area.startsWith(Publication.INFO_AREA_PREFIX)) {
+ if (policy.isSSLProtected() && !area.startsWith(Publication.INFO_AREA_PREFIX) && !request.getScheme().equals("https")) {
Session session = request.getSession(true);
OutgoingLinkRewriter rewriter = new OutgoingLinkRewriter(this.manager, getLogger());
String sslUri = rewriter.rewrite(url);
- return Collections.singletonMap(KEY_REDIRECT_URI, sslUri);
+ return Collections.singletonMap(KEY_REDIRECT_URI, sslUri);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org