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: Chris Burdess
Subject: Re: [cp-patches] Fix for HTTPConnection to set correct form of Host header
Date: Tue, 11 Jan 2005 11:38:51 +0000

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.
--
Chris Burdess





reply via email to

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