From: Fabian Keil Date: Mon, 22 Aug 2011 18:58:29 +0000 (+0000) Subject: When sending out the "no-server-data" response, do not log two LOG_LEVEL_CLF messages X-Git-Tag: v_3_0_18~127 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=bd7f66db01459e77cd2d05d5ff0d029f0935011f When sending out the "no-server-data" response, do not log two LOG_LEVEL_CLF messages send_crunch_response() already takes care of emitting the message, so there's no need for chat() to emit another one. Noticed while looking into #3394462 reported by Andy. --- diff --git a/jcc.c b/jcc.c index 6e667b21..9acaf262 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.361 2011/07/17 13:37:32 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.362 2011/07/17 13:38:05 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -2261,6 +2261,8 @@ static void chat(struct client_state *csp) "Empty server or forwarder response received on socket %d. " "Closing client socket %d without sending data.", csp->server_connection.sfd, csp->cfd); + log_error(LOG_LEVEL_CLF, + "%s - - [%T] \"%s\" 502 0", csp->ip_addr_str, http->cmd); } else { @@ -2269,7 +2271,6 @@ static void chat(struct client_state *csp) csp->server_connection.sfd); send_crunch_response(csp, error_response(csp, "no-server-data")); } - log_error(LOG_LEVEL_CLF, "%s - - [%T] \"%s\" 502 0", csp->ip_addr_str, http->cmd); free_http_request(http); mark_server_socket_tainted(csp); return;