You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by fm...@apache.org on 2010/09/01 17:57:33 UTC
svn commit: r991578 -
/sling/trunk/bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
Author: fmeschbe
Date: Wed Sep 1 15:57:33 2010
New Revision: 991578
URL: http://svn.apache.org/viewvc?rev=991578&view=rev
Log:
SLING-1716 Ensuere resource resolver is closed if request is intended to be terminated
Modified:
sling/trunk/bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
Modified: sling/trunk/bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java?rev=991578&r1=991577&r2=991578&view=diff
==============================================================================
--- sling/trunk/bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java (original)
+++ sling/trunk/bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java Wed Sep 1 15:57:33 2010
@@ -669,6 +669,11 @@ public class SlingAuthenticator implemen
// so desired by the handler
if (feedbackHandler.authenticationSucceeded(request, response,
authInfo)) {
+
+ // request will now be terminated, so close the resolver
+ // to release resources
+ resolver.close();
+
return false;
}
@@ -678,6 +683,11 @@ public class SlingAuthenticator implemen
// asked for redirect after authentication and/or impersonation
if (DefaultAuthenticationFeedbackHandler.handleRedirect(
request, response)) {
+
+ // request will now be terminated, so close the resolver
+ // to release resources
+ resolver.close();
+
return false;
}
@@ -723,6 +733,11 @@ public class SlingAuthenticator implemen
// authentication and/or impersonation
if (DefaultAuthenticationFeedbackHandler.handleRedirect(
request, response)) {
+
+ // request will now be terminated, so close the resolver
+ // to release resources
+ resolver.close();
+
return false;
}