2
0
Fork 0

[mod_deflate]: don't deflate after transfer-encoding

This commit is contained in:
Stefan Bühler 2010-02-13 16:03:03 +01:00
parent 59835b5eb1
commit 8f317d1ded
1 changed files with 8 additions and 0 deletions

View File

@ -550,6 +550,14 @@ static liHandlerResult deflate_handle(liVRequest *vr, gpointer param, gpointer *
return LI_HANDLER_GO_ON;
}
/* don't mess with content after transfer-encoding */
if (li_http_header_find_first(vr->response.headers, CONST_STR_LEN("transfer-encoding"))) {
if (debug) {
VR_DEBUG(vr, "%s", "deflate: Transfer-Encoding set => not compressing");
}
return LI_HANDLER_GO_ON;
}
/* announce that we have looked for accept-encoding */
li_http_header_append(vr->response.headers, CONST_STR_LEN("Vary"), CONST_STR_LEN("Accept-Encoding"));