diff --git a/NEWS b/NEWS index 41b7e68c..96ae0498 100644 --- a/NEWS +++ b/NEWS @@ -57,6 +57,7 @@ NEWS * replaced fprintf with log_error_write in fastcgi debug * fixed mem leak in ssi expression parser (#1753), thx Take5k * hide some ssl errors per default, enable them with debug.log-ssl-noise (#397) + * do not send content-encoding for 304 (#1754), thx yzlai - 1.4.19 - 2008-03-10 diff --git a/src/response.c b/src/response.c index eb1633a1..76f4e171 100644 --- a/src/response.c +++ b/src/response.c @@ -68,6 +68,7 @@ int http_response_write_header(server *srv, connection *con) { 0 != strcasecmp(ds->key->ptr, "X-Sendfile")) { if (0 == strcasecmp(ds->key->ptr, "Date")) have_date = 1; if (0 == strcasecmp(ds->key->ptr, "Server")) have_server = 1; + if (0 == strcasecmp(ds->key, "Content-Encoding") && 304 == con->http_status) continue; buffer_append_string_len(b, CONST_STR_LEN("\r\n")); buffer_append_string_buffer(b, ds->key);