Milt Epstein wrote:
>
> On Mon, 11 Sep 2000, Christopher K. St. John wrote:
> > Milt Epstein wrote:
> >
> > > In all cases?  That could be a bug with your servlet container.
> >
> > Often web servers turn off name lookup, since it can be very
>
> But note that he said "returns nothing" above -- according to the
> spec, as you quote below, if getRemoteHost() doesn't return the host
> name, it should return the IP address.  (Maybe he didn't really means
> "returns nothing" though.)
>

 I just double checked the 2.1 spec. The api docs say:

 getRemoteHost
 public java.lang.String getRemoteHost()

   Returns the fully qualified host name of the agent that sent
   the request. Same as the CGI variable REMOTE_HOST.

 nothing about returning the IP instead of blank, so I think it's
ok for the 2.1 containers to return an empty string (or maybe null?).
In fact, you could probably stretch the spec to allow always
returning an empty string no matter what. That's the safest thing
to assume in any case.


-cks

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to