Java Standard Edition (SE)
Networking Release Notes
Networking Release Notes
The following are known bugs and other networking issues for Java SE 1.4.2.
- In releases prior to 1.4.2, it was possible to create an
invalid URL instance such as the following:
new URL
("http://www.example.com:-1/index.html")
.
Specifying a port number of -1
is not valid. However,
in previous releases the -1
was stripped off when
sending such URLS with HTTP commands. In 1.4.2, the -1
is left in the URL and this may cause problems for some HTTP
servers or proxies. Applications should not create URL instances
with a -1
port number. Assuming the -1
refers to the default port in this example, the correct way to
create this URL is new URL
("http://www.example.com/index.html")
. This note
only applies to the single argument URL constructor.
- On Microsoft Windows 98/ME, a read timeout set using
Socket.setSoTimeout or an accept timeout set using
ServerSocket.setSoTimeout may result in a timeout that is
500ms later than expected. This issue is observable with all Java SE
releases and stems from a Microsoft Windows 98/ME bug. A patch for
Microsoft Windows 98/ME is obtainable through the following page on
the Microsoft website:
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q257821&
- Prior to Java SE 1.4.1 the
java.net.InetAddress.getLocalHost() would cache the lookup
of the IP address of the local machine for the entire session of
the application. This behaviour poses a problem for applications
running on machines that are connected to the internet via a
dial-up connection or machines that acquired their addresses
through DHCP. This has been corrected in 1.4.1 so that the local IP
address is no longer cached. InetAddress.getLocalHost()
will return the correct IP address for dial-up connections as well
as for DHCP. See bug 4211819.
- Prior to Java SE 1.4.1, the http/https protocol handlers would not
redirect correctly from a http URL to a https URL (and vice versa).
In particular, the redirect was attempted using the original URL
scheme. This has been fixed in 1.4.1. by returning the server
responses for such redirects (from http to https or https to http)
to the application. Therefore, it is the applications
responsibility to check the response code and recognize it as a
redirect. The Location header field value can be checked for the
redirect information, and then the application must decide whether
or not to follow the redirect using the new protocol. See bug
4620571.
- Prior to Java SE 1.4 the java.net.URLConnection class
would handle errors from http servers inconsistently. In particular
the getInputStream or other methods would throw a
FileNotFoundException if the http server returned a response code
>= 400 and the request was for a resource of a known file type.
This has been corrected in 1.4 so that an IOException is thrown
for any http error from the server and a specific exception of
FileNotFoundExeption when the resource is not found (ie: 404 or 410
response codes). The exception is thrown irrespective of the file
type.
Applications that assumed an exception would not be thrown when
an http error is returned from the server need to be aware of this
change in 1.4 - see 4160499.
Related to this issue is that
HttpURLConnection.getErrorStream() method can now been
used to read the error page from the http server when a http error
is returned from the server. Previously getErrorStream()
always returned null.
- On many Linux installations InetAddress.getLocalHost()
may return an InetAddress representing the loopback address
(127.0.0.1). This stems from many Linux installations configuring
/etc/hosts to map the hostname to the loopback address. If the host
has a static IP address then the /etc/hosts file should be
corrected to map the hostname to the host address.
If DHCP is used in conjunction with dynamic DNS then there are
two options (i) change the name service search order in
/etc/nsswitch.conf to use dns before the hosts file (ie:
"hosts: dns files"), or (ii) configure InetAddress to use the DNS
name service provider instead of the default provider
(-Dsun.net.spi.nameservice.provider.1=dns,sun). This issue
is being tracked in 4665037.
Content
License.
All information of this service is derived from the free sources and is provided solely in the form of quotations.
This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 403 / 158780550. Delta: 0.04294 с