Fix /become?user_name=... under GWT debugger

We have to capture and include the gwt.codesvr query parameter
in our redirect location in order to get the UI to start up.
If we don't the module asks us to recompile it.

Change-Id: I3eba440ce584e5d0de56bba2a408b9174f1aa676
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce 2010-03-04 17:09:00 -08:00
parent 54e464fb98
commit 0a7cb71478
1 changed files with 8 additions and 0 deletions

View File

@ -128,6 +128,14 @@ public class BecomeAnyAccountLoginServlet extends HttpServlet {
webSession.get().login(res, false);
final StringBuilder rdr = new StringBuilder();
rdr.append(urlProvider.get());
if (IS_DEV && req.getParameter("gwt.codesvr") != null) {
if (rdr.indexOf("?") < 0) {
rdr.append("?");
} else {
rdr.append("&");
}
rdr.append("gwt.codesvr=").append(req.getParameter("gwt.codesvr"));
}
rdr.append('#');
if (res.isNew()) {
rdr.append(PageLinks.REGISTER);