Index: protocols/http.c
===================================================================
RCS file: /sources/monit/monit/protocols/http.c,v
retrieving revision 1.48
diff -u -r1.48 http.c
--- protocols/http.c	1 Jan 2006 22:44:02 -0000	1.48
+++ protocols/http.c	13 Mar 2006 11:34:42 -0000
@@ -127,6 +127,12 @@
  
   /* The connection is kept open in case we have to follow a
      redirect */
+  log("DEBUG: HTTP request sent to server:\n"
+      "GET %s HTTP/1.1\r\nHost: %s\r\nAccept: */*\r\n"
+      "User-Agent: %s/%s\r\n%s\r\n",
+        request, Util_getHTTPHostHeader(s, host, STRLEN), 
+        prog, VERSION, get_auth_header(P, auth, STRLEN));
+
   if(socket_print(s, 
 		  "GET %s HTTP/1.1\r\n"
 		  "Host: %s\r\n"
@@ -468,6 +474,7 @@
   }
 
   Util_chomp(buf);
+  log("DEBUG: HTTP response status: %s\n", buf);
 
   if(sscanf(buf, "%*s %d", &H->status) !=1) {
     log("HTTP error: cannot parse HTTP status in response: %s\n", buf);
@@ -480,6 +487,7 @@
       break;
 
     Util_chomp(buf);
+    log("DEBUG: HTTP response headers: %s\n", buf);
    
     if(Util_startsWith(buf, "Content-Length")) {
       if(1 != sscanf(buf, "%*s%*[: ]%ld", &H->content_length)) {
