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);
}
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.