]> granicus.if.org Git - curl/commitdiff
Curl_proxyCONNECT: count received headers
authorMartin Jansen <martin@divbyzero.net>
Wed, 6 Mar 2013 20:20:44 +0000 (21:20 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 23 Mar 2013 22:20:01 +0000 (23:20 +0100)
Proxy servers tend to add their own headers at the beginning of
responses. The size of these headers was not taken into account by
CURLINFO_HEADER_SIZE before this change.

Bug: http://curl.haxx.se/bug/view.cgi?id=1204

lib/http_proxy.c

index 90609467e4ca40f735f8897fe9addbcc83d8d6f1..7c60e9582cbb2a3548a2424c0ecb4ea3b446bf02 100644 (file)
@@ -356,6 +356,10 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn,
 
                   result = Curl_client_write(conn, writetype, line_start,
                                              perline);
+
+                  data->info.header_size += (long)perline;
+                  data->req.headerbytecount += (long)perline;
+
                   if(result)
                     return result;