Fix buffer size comparison for the case header_start + 256 has same value to buffer_size (ticket #17

정찬훈 chanhun.jeong at navercorp.com
Tue Feb 12 02:38:41 UTC 2019


# HG changeset patch
# User Chanhun Jeong <chanhun.jeong at navercorp.com>
# Date 1549859813 -32400
#      Mon Feb 11 13:36:53 2019 +0900
# Node ID f2648ca4ed03a907e6d3c22729be82b3bc4027a0
# Parent  992bf7540a980c48a37c305d2c511cf9a48fe701
Fix buffer size comparison for the case header_start + 256 has same value to buffer_size (ticket #1722).
​
diff -r 992bf7540a98 -r f2648ca4ed03 src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c      Thu Feb 07 19:39:35 2019 +0300
+++ b/src/http/ngx_http_upstream.c      Mon Feb 11 13:36:53 2019 +0900
@@ -850,7 +850,7 @@
​
        ngx_http_file_cache_create_key(r);
​
-        if (r->cache->header_start + 256 >= u->conf->buffer_size) {
+        if (r->cache->header_start + 256 > u->conf->buffer_size) {
            ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
                          "%V_buffer_size %uz is not enough for cache key, "
                          "it should be increased to at least %uz",
​
​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20190212/ecc857bc/attachment.html>


More information about the nginx-devel mailing list