6659779: HttpURLConnections logger should log tunnel requests
Summary: Invoke Logger for CONNECT request/responses.
Reviewed-by: jccollet
--- 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);