[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
Re: [cp-patches] Fix for HTTPConnection to set correct form of Host header
Tue, 11 Jan 2005 12:50:51 +0100
Am Dienstag, 11. Januar 2005 12:38 schrieb Chris Burdess:
> Michael Koch wrote:
> >> 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 . JDK
> > omits it only when its not given in the URL . Then
> > URL.getPort() returns -1 which means "use default port of the
> > protocol". Is it possible to achieve this easily ?
> No, it is not possible to achieve this behaviour without adding an
> additional special field indicating which form to use.
Okay. please commit.