[EMAIL PROTECTED] (Craig R. McClanahan) writes:
> On Mon, 7 May 2001, Marc Saegesser wrote:
> > According to the JavaDoc for ServletRequest.getRemoteHost()
> >
> > Returns the fully qualified name of the client that sent the request, or the
> > IP address of the client if the name cannot be determined. For HTTP
> > servlets, same as the value of the CGI variable REMOTE_HOST.
> >
> > Based on that I would say that both implementations are wrong, you should
> > never get an empty or a null value back.
>
> Agreed. You should get either a host name or an IP address (in string
> form).
Disagree.
The CGI specification (1.1) has the following to say:
* REMOTE_HOST
The hostname making the request. If the server does not have this
information, it should set REMOTE_ADDR and leave this unset.
I would say the equivalent of not setting the REMOTE_HOST CGI variable
is to have request.getRemoteHost() return null.
--
`O O' | [EMAIL PROTECTED]
// ^ \\ | http://www.pyrites.org.uk/