Welcome! Log In Create A New Profile

Advanced

Re: [RFC] [PATCH] Autoindex: support sorting using URL parameters

Valentin V. Bartenev
January 30, 2013 01:56PM
On Tuesday 29 January 2013 21:49:46 Peter Wu wrote:
> Based on Apache HTTPD autoindex docs[1]. Supported:
> - C=N sorts the directory by file name
> - C=M sorts the directory by last-modified date, then file name
> - C=S sorts the directory by size, then file name
> - O=A sorts the listing in Ascending Order
> - O=D sorts the listing in Descending Order
>
> Not supported (does not make sense for nginx):
> - C=D sorts the directory by description, then file name
> - All F= (FancyIndex) related arguments
> - Version sorting for file names (V=)
> - Pattern filter (P=)
>
> Argument processing stops when the query string does not exactly match the
> options allowed by nginx, invalid values (like "C=m", "C=x" or "C=foo") are
> ignored and cause further processing to stop.
>
> C and O are the most useful options and can commonly be found in my old
> Apache logs (also outputted in header links). This patch is made for these
> cases, not for some exotic use of Apache-specific properties.
>
> [1]: http://httpd.apache.org/docs/2.4/mod/mod_autoindex.html
[...]

Personally I do not like these Apache hard-coded arguments.

I would prefer something like "autoindex_sort" directive

autoindex_sort /criterion/ [ /order/ ];

with variables support.

And if user want Apache-like behavior then he will be able to configure
it like this:

map $arg_C $criteria {
default name;
M modified;
S size;
}

map $arg_O $ord {
default asc;
D desc;
}

autoindex_sort $criteria $ord;


wbr, Valentin V. Bartenev

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[RFC] [PATCH] Autoindex: support sorting using URL parameters

Lekensteyn 2518 January 29, 2013 12:50PM

Re: [RFC] [PATCH] Autoindex: support sorting using URL parameters

Maxim Dounin 821 January 30, 2013 12:52PM

Re: [RFC] [PATCH] Autoindex: support sorting using URL parameters

Lekensteyn 1228 January 30, 2013 01:10PM

Re: [RFC] [PATCH] Autoindex: support sorting using URL parameters

Valentin V. Bartenev 862 January 30, 2013 01:56PM

Re: [RFC] [PATCH] Autoindex: support sorting using URL parameters

Lekensteyn 1034 January 30, 2013 04:04PM

Re: [RFC] [PATCH] Autoindex: support sorting using URL parameters

Lekensteyn 1064 February 02, 2013 04:08PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 220
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