From 0f043956ec83b1a007cf219a30be4b857d051ee4 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 12 Sep 2009 12:37:37 +0000 Subject: [PATCH 1/1] Make it easier to figure out whether or not the actual content length equals the one we expected. --- jcc.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) 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, -- 2.39.2