changeset 180:459d23a95dfb

6659779: HttpURLConnections logger should log tunnel requests Summary: Invoke Logger for CONNECT request/responses. Reviewed-by: jccollet
author chegar
date Tue, 15 Apr 2008 14:22:36 +0100
parents b627c3efd97c
children a954a6f3be6f 072695f32409
files src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Mon Apr 14 10:41:16 2008 -0400
+++ b/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);