[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] Fix for HTTPConnection to set correct form of Host head
From: |
Michael Koch |
Subject: |
Re: [cp-patches] Fix for HTTPConnection to set correct form of Host header |
Date: |
Tue, 11 Jan 2005 12:29:03 +0100 |
User-agent: |
KMail/1.7.1 |
Am Dienstag, 11. Januar 2005 11:59 schrieb Chris Burdess:
> The following patch corrects the form of the Host header to use
> when a non-default port is specified.
>
> 2005-01-11 Chris Burdess <address@hidden>
>
> * gnu/java/net/protocol/http/HTTPConnection.java: Use
> correct form of
> Host header when using a non-default port number.
>
> OK to commit?
Should work but is not what JDK does. With your code the port part of
the URL is omited when its the standard port [1]. JDK omits it only
when its not given in the URL [2]. Then URL.getPort() returns -1
which means "use default port of the protocol". Is it possible to
achieve this easily ? Otherwise I think we can live with this
behavior when you document it properly.
Michael
[1] http://www.classpath.org:80/
[2] http://www.classpath.org/
--
Homepage: http://www.worldforge.org/