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 ?