hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Wright (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HTTPCORE-326) HttpHost class should not add port number if port is default
Date Wed, 09 Jan 2013 22:02:12 GMT
Karl Wright created HTTPCORE-326:
------------------------------------

             Summary: HttpHost class should not add port number if port is default
                 Key: HTTPCORE-326
                 URL: https://issues.apache.org/jira/browse/HTTPCORE-326
             Project: HttpComponents HttpCore
          Issue Type: Bug
          Components: HttpCore
    Affects Versions: 4.2.3, 4.2.2
            Reporter: Karl Wright


The following method:

{code}
    public String toHostString() {
        if (this.port != -1) {
            //the highest port number is 65535, which is length 6 with the addition of the
colon
            StringBuilder buffer = new StringBuilder(this.hostname.length() + 6);
            buffer.append(this.hostname);
            buffer.append(":");
            buffer.append(Integer.toString(this.port));
            return buffer.toString();
        } else {
            return this.hostname;
        }
    }
{code}

... always appends a port number.  Unfortunately, some sites don't accept a port number. 
See CONNECTORS-604.



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message