From: Fabian Keil Date: Sat, 12 Sep 2009 12:37:37 +0000 (+0000) Subject: Make it easier to figure out whether or not the actual content length equals the... X-Git-Tag: v_3_0_15~59 X-Git-Url: http://www.privoxy.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=0f043956ec83b1a007cf219a30be4b857d051ee4;hp=6b8470716bdfd93626b04493ec2f751b09091bd7;p=privoxy.git Make it easier to figure out whether or not the actual content length equals the one we expected. --- diff --git a/jcc.c b/jcc.c index da4a7f52..f6e1c9be 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.290 2009/09/12 12:32:26 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.291 2009/09/12 12:35:14 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -1869,10 +1869,20 @@ static void chat(struct client_state *csp) } if (server_body && server_response_is_complete(csp, byte_count)) { - log_error(LOG_LEVEL_CONNECT, - "Done reading from server. Expected content length: %llu. " - "Actual content length: %llu. Bytes most recently read: %d.", - csp->expected_content_length, byte_count, len); + if (csp->expected_content_length == byte_count) + { + log_error(LOG_LEVEL_CONNECT, + "Done reading from server. Content length: %llu as expected. " + "Bytes most recently read: %d.", + byte_count, len); + } + else + { + log_error(LOG_LEVEL_CONNECT, + "Done reading from server. Expected content length: %llu. " + "Actual content length: %llu. Bytes most recently read: %d.", + csp->expected_content_length, byte_count, len); + } len = 0; /* * XXX: should not jump around,