diff options
| author | Andrew Clayton <ac@sigsegv.uk> | 2025-06-26 22:20:46 +0100 |
|---|---|---|
| committer | Andrew Clayton <a.clayton@nginx.com> | 2025-06-26 22:24:01 +0100 |
| commit | 0c5bb8a5e10657cec505729596c8b2f0c794cc8f (patch) | |
| tree | 1695c1ba5698c539795bf265f56f9b606dbced23 /src/core/ngx_conf_file.c | |
| parent | 4eaecc5e8aa7bbaf9e58bf56560a8b1e67d0a8b7 (diff) | |
| download | nginx-0c5bb8a5e10657cec505729596c8b2f0c794cc8f.tar.gz nginx-0c5bb8a5e10657cec505729596c8b2f0c794cc8f.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/core/ngx_conf_file.c')
| -rw-r--r-- | src/core/ngx_conf_file.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c index 197704b0f..cb566dac8 100644 --- a/src/core/ngx_conf_file.c +++ b/src/core/ngx_conf_file.c @@ -593,14 +593,6 @@ ngx_conf_read_token(ngx_conf_t *cf) return NGX_ERROR; } - if (n != size) { - ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, - ngx_read_file_n " returned " - "only %z bytes instead of %z", - n, size); - return NGX_ERROR; - } - b->pos = b->start + len; b->last = b->pos + n; start = b->start; |
