From 25bfad73c53f5f5d9e3bd32fc9394ca42b239d01 Mon Sep 17 00:00:00 2001 From: hns Date: Tue, 26 Jun 2007 09:11:34 +0000 Subject: [PATCH] * Remove unused obsolete fields. * Fix cookie domain check against null host string. --- src/helma/servlet/AbstractServletClient.java | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/helma/servlet/AbstractServletClient.java b/src/helma/servlet/AbstractServletClient.java index 022781ca..9dc0fa0f 100644 --- a/src/helma/servlet/AbstractServletClient.java +++ b/src/helma/servlet/AbstractServletClient.java @@ -38,15 +38,6 @@ import org.apache.commons.fileupload.servlet.ServletRequestContext; */ 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 int uploadLimit = 1024; @@ -187,9 +178,12 @@ public abstract class AbstractServletClient extends HttpServlet { if (proxiedHost.toLowerCase().indexOf(resCookieDomain) == -1) { resCookieDomain = null; } - } else if ((host != null) && - host.toLowerCase().indexOf(resCookieDomain) == -1) { - resCookieDomain = null; + } else { + String host = (String) reqtrans.get("http_host"); + // http_host is guaranteed to be lower case + if (host != null && host.indexOf(resCookieDomain) == -1) { + resCookieDomain = null; + } } }