Welcome! Log In Create A New Profile

Advanced

Bug report: missing SCARCE string in nginx-1.1.15/src/http/ngx_http_file_cache.c [patch]

Max
February 16, 2012 04:10AM
Hello,

the value of the NGX_HTTP_CACHE_SCARCE cache status is defined in
nginx-1.1.15/src/http/ngx_http_cache.h, but unlike the other cache
status strings, it's missing from nginx-1.1.15/src/http/ngx_http_file_cache.c.

The function ngx_http_upstream_cache_status() in
nginx-1.1.15/src/http/ngx_http_upstream.c references the status
strings directly as ngx_http_cache_status[n].len, so with the
SCARCE cache status string missing, this is a segmentation violation
waiting to happen.

Here's the patch to fix the problem:

<patch>
--- src/http/ngx_http_file_cache.c.orig 2012-02-16 00:18:21.000000000 -0800
+++ src/http/ngx_http_file_cache.c 2012-02-16 00:25:00.000000000 -0800
@@ -53,7 +53,8 @@
ngx_string("EXPIRED"),
ngx_string("STALE"),
ngx_string("UPDATING"),
- ngx_string("HIT")
+ ngx_string("HIT"),
+ ngx_string("SCARCE")
};
---</patch>

Max
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Bug report: missing SCARCE string in nginx-1.1.15/src/http/ngx_http_file_cache.c [patch]

Max February 16, 2012 04:10AM

Re: Bug report: missing SCARCE string in nginx-1.1.15/src/http/ngx_http_file_cache.c [patch]

Maxim Dounin February 16, 2012 05:10AM

Re[2]: Bug report: missing SCARCE string innginx-1.1.15/src/http/ngx_http_file_cache.c [patch]

Max February 17, 2012 03:44AM

Re: Bug report: missing SCARCE string innginx-1.1.15/src/http/ngx_http_file_cache.c [patch]

Maxim Dounin February 17, 2012 06:24AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 299
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready