classpath-patches
[Top][All Lists]
Advanced

[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:50:51 +0100
User-agent: KMail/1.7.1

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 [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 ?
>
> No, it is not possible to achieve this behaviour without adding an
> additional special field indicating which form to use.


Okay. please commit.


Michael
-- 
Homepage: http://www.worldforge.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]