summaryrefslogtreecommitdiff
path: root/src/http_chunk.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2020-09-03 01:58:22 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2020-10-11 12:19:24 -0400
commit5fd8a26a75ac59dadb6671acb609b53505b0f801 (patch)
treef292721eda708ab97edf585b665c0993c29d7643 /src/http_chunk.c
parent3baef447b32256e5ba85f1cc37f18319a343fa93 (diff)
downloadlighttpd-git-5fd8a26a75ac59dadb6671acb609b53505b0f801.tar.gz
[core] defer optimization to read small files
defer optimization to read small files into memory until after response_start hooks have a chance to run, e.g. until after mod_deflate chooses whether or not to serve file from compressed cache, if deflate.cache-dir is configured
Diffstat (limited to 'src/http_chunk.c')
-rw-r--r--src/http_chunk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http_chunk.c b/src/http_chunk.c
index cdb3aa8f..39ba3ffe 100644
--- a/src/http_chunk.c
+++ b/src/http_chunk.c
@@ -134,7 +134,7 @@ int http_chunk_append_file(request_st * const r, const buffer * const fn) {
}
int http_chunk_append_file_fd(request_st * const r, const buffer * const fn, const int fd, const off_t sz) {
- if (sz > 32768) {
+ if (sz > 32768 || !r->resp_send_chunked) {
http_chunk_append_file_fd_range(r, fn, fd, 0, sz);
return 0;
}