From: Fabian Keil Date: Wed, 29 Jun 2011 18:36:49 +0000 (+0000) Subject: In finish_http_response(), don't add an Content-Encoding header if compression failed. X-Git-Tag: v_3_0_18~193 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=cdb484893a837ef3f07a9073e5f69ac0d6a2a797 In finish_http_response(), don't add an Content-Encoding header if compression failed. --- diff --git a/cgi.c b/cgi.c index 71d8a52e..02270caf 100644 --- a/cgi.c +++ b/cgi.c @@ -1,4 +1,4 @@ -const char cgi_rcs[] = "$Id: cgi.c,v 1.133 2011/06/25 12:40:27 fabiankeil Exp $"; +const char cgi_rcs[] = "$Id: cgi.c,v 1.134 2011/06/25 12:40:55 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgi.c,v $ @@ -1588,8 +1588,8 @@ struct http_response *finish_http_response(const struct client_state *csp, struc { freez(rsp->body); rsp->body = compressed_content; + err = enlist_unique_header(rsp->headers, "Content-Encoding", "deflate"); } - err = enlist_unique_header(rsp->headers, "Content-Encoding", "deflate"); } #endif