Currently, sun.net.www.protocol.http.HttpURLConnection doesn't use persistent
connections whenever issuing a POST or PUT through a proxy (see lines 159-169
of HttpURLConnection.java). Unfortunately, this has significant performance
implications for systems which transport data via HTTP--in the case of RMI, it
rules out the use of persistent connections for most HTTP-tunneled RMI calls
(since such calls typically pass through at least one proxy).
A comment above the cited code section describes a "bug" in versions of the
Netscape proxy in which a persistent connection is maintained between the proxy
and client even if the connection between the proxy and targeted server is not
persistent. However, section 8.1.3 of RFC 2068 seems to imply that this
behavior of the proxy is acceptable:
The proxy server MUST signal persistent connections separately with its
clients and the origin servers (or other proxy servers) that it connects
to. Each persistent connection applies to only one transport link.
In light of this, it appears that the treatment of persistent connections by
the Netscape proxy is acceptable, and that the Java runtime need not avoid
persistent connections with proxies when issuing PUT/POST messages.
connections whenever issuing a POST or PUT through a proxy (see lines 159-169
of HttpURLConnection.java). Unfortunately, this has significant performance
implications for systems which transport data via HTTP--in the case of RMI, it
rules out the use of persistent connections for most HTTP-tunneled RMI calls
(since such calls typically pass through at least one proxy).
A comment above the cited code section describes a "bug" in versions of the
Netscape proxy in which a persistent connection is maintained between the proxy
and client even if the connection between the proxy and targeted server is not
persistent. However, section 8.1.3 of RFC 2068 seems to imply that this
behavior of the proxy is acceptable:
The proxy server MUST signal persistent connections separately with its
clients and the origin servers (or other proxy servers) that it connects
to. Each persistent connection applies to only one transport link.
In light of this, it appears that the treatment of persistent connections by
the Netscape proxy is acceptable, and that the Java runtime need not avoid
persistent connections with proxies when issuing PUT/POST messages.