You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2002/11/13 19:49:06 UTC

DO NOT REPLY [Bug 14520] New: - empty host header with ip address

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14520>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14520

empty host header with ip address

           Summary: empty host header with ip address
           Product: Commons
           Version: Nightly Builds
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: HttpClient
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: mikko.matto@iocore.fi


file: HttpMethodBase.java method: addHostRequestHeader

HttpClient writes an empty Host header if the host is referred using IP address.
HTTP 1.1 RFC is not too clear what should be used in this case. However, other
HTTP 1.1 implementations (e.g. Java 1.4.0) uses IP address instead of dns name
in the header.

Furthermore, some HTTP server implementations (e.g. Jetty) will return "400 bad
request" if it encounters an empty Host header. That may be a bug in Jetty, but
it might be a good idea to use IP address in Host header to increase compability.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>