Bug 277021 Fix FormAuthenticator to reconstitute original url more correctly

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@238 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
David Jencks 2009-05-19 22:18:46 +00:00
parent 6098e46b51
commit 7b3eda29df
1 changed files with 6 additions and 8 deletions

View File

@ -215,17 +215,15 @@ public class FormAuthenticator extends LoginAuthenticator
if (mandatory) if (mandatory)
{ {
// redirect to login page // redirect to login page
if (request.getQueryString() != null)
uri += "?" + request.getQueryString();
synchronized (session) synchronized (session)
{ {
if (session.getAttribute(__J_URI)==null) if (session.getAttribute(__J_URI)==null)
session.setAttribute(__J_URI, request.getScheme() + "://" {
+ request.getServerName() StringBuffer buf = request.getRequestURL();
+ ":" if (request.getQueryString() != null)
+ request.getServerPort() buf.append("?").append(request.getQueryString());
+ URIUtil.addPaths(request.getContextPath(), uri)); session.setAttribute(__J_URI, buf.toString());
}
} }
if (_dispatch) if (_dispatch)