This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.auth.form-1.0.0
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-auth-form.git

commit 64b23944c56ea83b0b582fef33bafa4cf3318df8
Author: Justin Edelson <[email protected]>
AuthorDate: Tue Apr 27 15:27:54 2010 +0000

    SLING-1498 - saving resource being requested
    
    git-svn-id: 
https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/formauth@938516 
13f79535-47bb-0310-9956-ffa450edef68
---
 .../java/org/apache/sling/formauth/FormAuthenticationHandler.java   | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/src/main/java/org/apache/sling/formauth/FormAuthenticationHandler.java 
b/src/main/java/org/apache/sling/formauth/FormAuthenticationHandler.java
index 624aceb..75ec613 100644
--- a/src/main/java/org/apache/sling/formauth/FormAuthenticationHandler.java
+++ b/src/main/java/org/apache/sling/formauth/FormAuthenticationHandler.java
@@ -314,7 +314,11 @@ public class FormAuthenticationHandler implements 
AuthenticationHandler,
 
         // append originally requested resource (for redirect after login)
         char parSep = '?';
-        final String resource = getLoginResource(request);
+        String resource = getLoginResource(request);
+        if (resource == null) {
+            resource = request.getContextPath() + request.getPathInfo();
+        }
+
         if (resource != null) {
             targetBuilder.append(parSep).append(Authenticator.LOGIN_RESOURCE);
             targetBuilder.append("=").append(

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to