6659779: HttpURLConnections logger should log tunnel requests
authorchegar
Tue, 15 Apr 2008 14:22:36 +0100
changeset 478 5adf3e3f1ff3
parent 477 7a8dfe17a7eb
child 479 c6ddcfc7ff4d
child 485 a66666a5898c
6659779: HttpURLConnections logger should log tunnel requests Summary: Invoke Logger for CONNECT request/responses. Reviewed-by: jccollet
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);