# HG changeset patch # User chegar # Date 1208265756 -3600 # Node ID 5adf3e3f1ff315ae72a4a8b8756bf62ad1abf25d # Parent 7a8dfe17a7eb118770ec194b9f947e8d572a198e 6659779: HttpURLConnections logger should log tunnel requests Summary: Invoke Logger for CONNECT request/responses. Reviewed-by: jccollet diff -r 7a8dfe17a7eb -r 5adf3e3f1ff3 jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java --- a/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java Mon Apr 14 10:41:16 2008 -0400 +++ b/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java Tue Apr 15 14:22:36 2008 +0100 @@ -1450,6 +1450,9 @@ // so ProgressSource is null. http.parseHTTP(responses, null, this); + /* Log the response to the CONNECT */ + logger.fine(responses.toString()); + statusLine = responses.getValue(0); StringTokenizer st = new StringTokenizer(statusLine); st.nextToken(); @@ -1563,6 +1566,10 @@ requests.setIfNotSet("Accept", acceptString); setPreemptiveProxyAuthentication(requests); + + /* Log the CONNECT request */ + logger.fine(requests.toString()); + http.writeRequests(requests, null); // remove CONNECT header requests.set(0, null, null);