[PATCH] HTTP: Add 'autoindex_max_length' directive
Maxim Dounin
mdounin at mdounin.ru
Mon Mar 31 15:12:07 UTC 2014
Hello!
On Sun, Mar 30, 2014 at 05:54:43PM +0200, sfan5 wrote:
> # HG changeset patch
> # User sfan5 <sfan5 at live.de>
> # Date 1396194835 -7200
> # Sun Mar 30 17:53:55 2014 +0200
> # Node ID 35328d85f9b629e3593b1f862af61af9bd743b3f
> # Parent a24f88eff684889a203b04e8be70ce0e3899dc30
> HTTP: Add 'autoindex_max_length' directive
>
> The 'autoindex_max_length' directive controls the length after which a
> filename is cut-off by the http_autoindex module.
>
> diff -r a24f88eff684 -r 35328d85f9b6
> src/http/modules/ngx_http_autoindex_module.c
> --- a/src/http/modules/ngx_http_autoindex_module.c Fri Mar 28 20:22:57
> 2014 +0400
> +++ b/src/http/modules/ngx_http_autoindex_module.c Sun Mar 30 17:53:55
> 2014 +0200
> @@ -40,13 +40,12 @@
> ngx_flag_t enable;
> ngx_flag_t localtime;
> ngx_flag_t exact_size;
> + ngx_uint_t max_length;
> } ngx_http_autoindex_loc_conf_t;
>
>
> #define NGX_HTTP_AUTOINDEX_PREALLOCATE 50
>
> -#define NGX_HTTP_AUTOINDEX_NAME_LEN 50
> -
You may attach this patch to the ticket #9
(http://trac.nginx.org/nginx/ticket/9), but it's highly unlikely
to be committed.
Overral I would prefer to make it possible to generate xml and/or
json out of autoindex, to allow arbitrary presentation processing
either using xslt filter or with client-side code. Adding
presentation-level options like this one looks like a wrong way to
go.
--
Maxim Dounin
http://nginx.org/
More information about the nginx-devel
mailing list