I wish this person had told us sooner....oh well...

Any ideas?

-jon


----------
From: Janne Hietamäki <[EMAIL PROTECTED]>
Organization: Abako Mediat Oy
Reply-To: [EMAIL PROTECTED]
Date: Sun, 16 Jan 2000 16:44:17 +0200
To: [EMAIL PROTECTED]
Subject: JServ bug and bug submitting form doesn't seem to work :-P


Here is the bug I tried to submit, hope you can submit it into bug
reporting system:

real name: Janne Hietamaki
email: [EMAIL PROTECTED]
release: 1.3.9 + JServ 1.1b1 - 1.1Final
class: sw-bug
severity: serious
environment: Redhat Linux 5.2, Blackdown jdk 1.1.7B v3 and
                   Sun Solaris, SunOS Release 5.5.1, sun jdk 1.1.6
synopsis: HttpServletRequest.getRemoteHost returns empty string
full description: 
req.getRemoteHost returns empty string, I've had this problem with all
versions
of JServ 1.1 (from beta1 to final). Same problem in few different linux
boxes 
and Sun Solaris. Bug does not exist in the 1.0.

HostnameLookups are turned on in the httpd.conf and REMOTE_HOST variable
returns correct string to the cgi-bin.

JServ is compiled in to the Apache - no DSO.
How can we repeat this problem?:

source:
protected void doGet (HttpServletRequest req, HttpServletResponse res)
 throws ServletException, IOException
{
  ServletOutputStream out = res.getOutputStream();
  res.setContentType("text/html");
  out.println("<PRE>");
  out.println("HOST \""+req.getRemoteHost()+"\"");
  out.println("IP   \""+req.getRemoteAddr()+"\"");
  out.println("NAME
\""+java.net.InetAddress.getByName(req.getRemoteAddr()).getHostName()+"\"");
  out.close()    
}

result:
HOST ""
IP   "123.123.123.123"
NAME "host.domain.org"


Thanks, Janne.



--
----------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to