[mod_deflate] do not compress any 1xx status

1xx status should not reach mod_deflate, but if any do, do not compress
This commit is contained in:
Glenn Strauss 2023-08-11 19:58:40 -04:00
parent b9ec84f06f
commit 73f3c7f2d4
1 changed files with 5 additions and 4 deletions

View File

@ -1901,16 +1901,17 @@ REQUEST_FUNC(mod_deflate_handle_response_start) {
return HANDLER_GO_ON;
/* disable compression for some http status types. */
if (r->http_status < 200)
return HANDLER_GO_ON; /* r->http_status is 1xx intermed response */
switch(r->http_status) {
case 100:
case 101:
case 200: /* common case */
default:
break;
case 204:
case 205:
case 304:
/* disable compression as we have no response entity */
return HANDLER_GO_ON;
default:
break;
}
mod_deflate_patch_config(r, p);