]> granicus.if.org Git - curl/commitdiff
http2: show the received header for better debugging
authorDaniel Stenberg <daniel@haxx.se>
Thu, 7 Aug 2014 11:26:02 +0000 (13:26 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 7 Aug 2014 11:26:15 +0000 (13:26 +0200)
lib/http2.c

index c53012d6ed0c402c3c4880c2cdf64a0f5f933f06..fa2fb50bf354d60e2f15a336faddfc71fc62cb04 100644 (file)
@@ -498,11 +498,13 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame,
     }
 
     /* convert to a HTTP1-style header */
-    infof(conn->data, "got header\n");
     Curl_add_buffer(c->header_recvbuf, name, namelen);
     Curl_add_buffer(c->header_recvbuf, ":", 1);
     Curl_add_buffer(c->header_recvbuf, value, valuelen);
     Curl_add_buffer(c->header_recvbuf, "\r\n", 2);
+
+    infof(conn->data, "got http2 header: %*s: %*s\n",
+          namelen, name, valuelen, value);
   }
 
   return 0; /* 0 is successful */