[PATCH] HTTP: allow tuning test_types_hash

Maxim Dounin mdounin at mdounin.ru
Tue Mar 14 12:09:33 UTC 2023


Hello!

On Tue, Mar 14, 2023 at 07:09:48PM +0800, Danila Vershinin via nginx-devel wrote:

> # HG changeset patch
> # User Danila Vershinin <dvershinin at cloudlinux.com>
> # Date 1678790847 -28800
> #      Tue Mar 14 18:47:27 2023 +0800
> # Node ID ccb905b26f0efcd6eb3814ca9900616bb8095bec
> # Parent  8771d35d55d0a2b1cefaab04401d6f837f5a05a2
> HTTP: allow tuning test_types_hash.
> 
> In edge cases, with admittedly unnecessary long or numerous MIME type
> entries in config, users are presented with a startup error message
> asking to adjust test_types_hash_* directives which do not actually
> exist. This adds those directives.

You may want to be more specific about the edge cases.  Thanks in 
advance.

In the past, the usually observed "edge cases" were mostly about 
misconfigurations, and not real edge cases.  The rest is probably 
to be addressed without introduction of additional directives.

See the following related tickets:

https://trac.nginx.org/nginx/ticket/203
https://trac.nginx.org/nginx/ticket/1537
https://trac.nginx.org/nginx/ticket/1446

> 
> diff -r 8771d35d55d0 -r ccb905b26f0e src/http/ngx_http.c
> --- a/src/http/ngx_http.c	Fri Mar 10 07:43:50 2023 +0300
> +++ b/src/http/ngx_http.c	Tue Mar 14 18:47:27 2023 +0800
> @@ -2083,6 +2083,9 @@
>      ngx_str_t *default_types)
>  {
>      ngx_hash_init_t  hash;
> +    ngx_http_core_main_conf_t *cmcf;

It looks like there is a style issue here.

[...]

-- 
Maxim Dounin
http://mdounin.ru/


More information about the nginx-devel mailing list