* Remove unused obsolete fields.

* Fix cookie domain check against null host string.
This commit is contained in:
hns 2007-06-26 09:11:34 +00:00
parent 62e678468c
commit 25bfad73c5

View file

@ -38,15 +38,6 @@ import org.apache.commons.fileupload.servlet.ServletRequestContext;
*/ */
public abstract class AbstractServletClient extends HttpServlet { public abstract class AbstractServletClient extends HttpServlet {
// host on which Helma app is running
String host = null;
// port of Helma RMI server
int port = 0;
// RMI url of Helma app
String hopUrl;
// limit to HTTP uploads per file in kB // limit to HTTP uploads per file in kB
int uploadLimit = 1024; int uploadLimit = 1024;
@ -187,11 +178,14 @@ public abstract class AbstractServletClient extends HttpServlet {
if (proxiedHost.toLowerCase().indexOf(resCookieDomain) == -1) { if (proxiedHost.toLowerCase().indexOf(resCookieDomain) == -1) {
resCookieDomain = null; resCookieDomain = null;
} }
} else if ((host != null) && } else {
host.toLowerCase().indexOf(resCookieDomain) == -1) { String host = (String) reqtrans.get("http_host");
// http_host is guaranteed to be lower case
if (host != null && host.indexOf(resCookieDomain) == -1) {
resCookieDomain = null; resCookieDomain = null;
} }
} }
}
// check if session cookie is present and valid, creating it if not. // check if session cookie is present and valid, creating it if not.
checkSessionCookie(request, response, reqtrans, resCookieDomain); checkSessionCookie(request, response, reqtrans, resCookieDomain);