JDK-4646885 : HttpURLConnection writeRequests retry handles proxy incorrectly
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2002-03-05
  • Updated: 2016-07-07
  • Resolved: 2002-03-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other Other
1.4.0_01 01Fixed 1.4.1Fixed
Related Reports
Relates :  
Description
HttpURLConnection will call writeRequests() to actually send out the HTTP request. If certain condition triggers a write error inside writeRequests(), one retry will happen. For this retry, the connection will be disconnected and we would retry the same request after setting up a new connection (through setNewClient call). However, setNewClient would ignore any proxy settings. what should be called is if proxy is set, then call setProxiedClient.

This bug was exposed by a J2EE soap application when trying to add items to a UDDI server.

===========

Note, this has affected JSSE & https.  Web services
ran into this bug when doing UDDI publishing via https.

A first URL connection gets the
auth token, a second URL connection publishes the data.

The second connection was creating this 
certain condition, and the second connection
tried to establish a new connection without
setting up the proxy correctly.

Thus the client program thought it was already tunneled,
and sent a Client Hello.  This was an "unrecognised command"
to the proxy.  The SSL client was trying to read the
following as a "server hello", which obviously would fail.
	
	HTTP/1.0 Bad Request
	Server: Netscape-Proxy/3.52

	Your browser sent a message this server could not understand.

###@###.### 2002-03-14


Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.4.0_01 hopper FIXED IN: 1.4.0_01 hopper INTEGRATED IN: 1.4.0_01 hopper VERIFIED IN: 1.4.0_01
14-06-2004

EVALUATION See Description. HttpURLConneciton.writeRequests retry would bypass proxy settings. ###@###.### 2002-03-04
04-03-2002