* BF [2787006] Repeated redirect for invalid url
* Generator - typo, produce xml that's not well form
This commit is contained in:
parent
5241a5d6c9
commit
270dc8d679
|
@ -93,8 +93,10 @@ public class RequestAnalyzer
|
|||
m_ctx = servlet.getCtx ();
|
||||
m_requestURL = m_request.getRequestURL ().toString ();
|
||||
m_serverName = m_request.getServerName ();
|
||||
m_baseURL = m_requestURL.substring (0, m_requestURL.indexOf (m_serverName)
|
||||
+ m_serverName.length () + servletExtend.length ())
|
||||
int baseStart = m_requestURL.indexOf(m_request.getContextPath(), m_requestURL.indexOf (m_serverName) + m_serverName.length ());
|
||||
if (baseStart <= 0)
|
||||
baseStart = m_requestURL.indexOf (m_serverName) + m_serverName.length ();
|
||||
m_baseURL = m_requestURL.substring (0, baseStart + servletExtend.length ())
|
||||
+ m_request.getContextPath ();
|
||||
m_relativeURL = m_requestURL.substring (m_baseURL.length ());
|
||||
// If RelativeURL is empty it should be /
|
||||
|
@ -121,7 +123,9 @@ public class RequestAnalyzer
|
|||
m_WebProject = webProjectCache.getWebProject (defaultID[0]);
|
||||
else {
|
||||
m_isRedirect = true;
|
||||
m_redirectURL = m_requestURL + "admin/";
|
||||
m_redirectURL
|
||||
= m_requestURL.substring(0, m_requestURL.indexOf("/", m_requestURL.indexOf (m_serverName) + m_serverName.length ()));
|
||||
m_redirectURL += "/admin/";
|
||||
}
|
||||
// JJ
|
||||
//throw new IllegalStateException("Unknown context - Set up Web Project"); // no known context
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
|
@ -106,7 +106,7 @@ public class Generator
|
|||
private void generateSystemHeader (HttpServletCM thisServlet)
|
||||
{
|
||||
xmlCode.append ("<system>\n");
|
||||
xmlCode.append ("<compiere>\n");
|
||||
xmlCode.append ("<adempiere>\n");
|
||||
xmlCode.append ("<mainversion>" + Adempiere.MAIN_VERSION
|
||||
+ "</mainversion>\n");
|
||||
xmlCode.append ("<dateversion>" + Adempiere.DATE_VERSION
|
||||
|
|
Loading…
Reference in New Issue