commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 11220] - Host request header does not contain port
Date Sat, 27 Jul 2002 01:44:35 GMT
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=11220>.
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=11220

Host request header does not contain port

jsdever@sympatico.ca changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From jsdever@sympatico.ca  2002-07-27 01:44 -------
This behaviour has changed slightly since alpha1.  The current behaviour is as
follows: 
    if (!isIpAddress(host)) {
        if (port == 80) {
            setRequestHeader("Host", host);
        } else {
            setRequestHeader("Host", host + ":" + port);
        }
    } else {
        setRequestHeader("Host", "");
    }

So if the host is an actual hostname, and is not port 80, then the port will be
concatenated to the hostname seperated with a colon.

If the host is an ipaddress, then the host header is added but with a blank
value.

<cite href="http://www.ietf.org/rfc/rfc2616.txt">
   A client MUST include a Host header field in all HTTP/1.1 request
   messages . If the requested URI does not include an Internet host
   name for the service being requested, then the Host header field MUST
   be given with an empty value. An HTTP/1.1 proxy MUST ensure that any
   request message it forwards does contain an appropriate Host header
   field that identifies the service being requested by the proxy. All
   Internet-based HTTP/1.1 servers MUST respond with a 400 (Bad Request)
   status code to any HTTP/1.1 request message which lacks a Host header
   field.
</cite>

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message