summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http_file_cache.c
diff options
context:
space:
mode:
authorAndrew Clayton <ac@sigsegv.uk>2025-06-26 22:20:46 +0100
committerAndrew Clayton <a.clayton@nginx.com>2025-06-26 22:24:01 +0100
commit0c5bb8a5e10657cec505729596c8b2f0c794cc8f (patch)
tree1695c1ba5698c539795bf265f56f9b606dbced23 /src/http/ngx_http_file_cache.c
parent4eaecc5e8aa7bbaf9e58bf56560a8b1e67d0a8b7 (diff)
downloadnginx-no-short-read-checks.tar.gz
nginx-no-short-read-checks.tar.bz2
Remove short read checksno-short-read-checks
This removes a bunch of checks for cases where we _read_ less bytes than asked for. There are several reasons why we may _read_ less bytes including reading data from a network file system. This has proven to be an issue. Closes: https://github.com/nginx/nginx/issues/265 Signed-off-by: Andrew Clayton <ac@sigsegv.uk>
Diffstat (limited to 'src/http/ngx_http_file_cache.c')
-rw-r--r--src/http/ngx_http_file_cache.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/http/ngx_http_file_cache.c b/src/http/ngx_http_file_cache.c
index 5209f003b..7f27c3fe8 100644
--- a/src/http/ngx_http_file_cache.c
+++ b/src/http/ngx_http_file_cache.c
@@ -1554,13 +1554,6 @@ ngx_http_file_cache_update_header(ngx_http_request_t *r)
goto done;
}
- if ((size_t) n != sizeof(ngx_http_file_cache_header_t)) {
- ngx_log_error(NGX_LOG_CRIT, r->connection->log, 0,
- ngx_read_file_n " read only %z of %z from \"%s\"",
- n, sizeof(ngx_http_file_cache_header_t), file.name.data);
- goto done;
- }
-
if (h.version != NGX_HTTP_CACHE_VERSION
|| h.last_modified != c->last_modified
|| h.crc32 != c->crc32