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

Peter Wu lekensteyn at gmail.com
Wed Jan 30 18:08:25 UTC 2013


Hi,

Thank you for your feedback.

On Wednesday 30 January 2013 21:50:57 Maxim Dounin wrote:
> Overrall I tend to think that it's bad idea to do autoindex more 
> customizable.  I would rather like to see it producing XML and 
> hence any customization being possible with XSLT filter.

Do you want nginx to spit out XML? I am in favor of passing parameters this 
way to nginx so that the client does not have to do anything to see a sorted 
directory index. Use case: curl/wget. Yes, I know I can pipe it to sort and 
stuff, but that takes more commands.

I have also considered using Javascript for sorting, but that is UGLY just to 
get the directory index correct and won't work with NoScript enabled.

If you prefer not touching this autoindex module, but building an XML thing, 
you may also consider outputting JSON (there is also request for that). So, 
you want to provide the current "autoindex" module and create a new 
"fancy_autoindex" module with these XML/JSON/sorting features?

> > Parsing URL parameters is done in a separate function which is currently
> > non-void. Since the return value is not used at the moment, it can also be
> > make void. Thoughts?
> 
> You may want to use ngx_http_arg() function instead of reinventing 
> the wheel.
I know that function, but that function does not work with the ";" separator. 
I just watched how Apache acted on my requests and build the nginx 
compatibility stuff with that in mind.

Regards,
Peter



More information about the nginx-devel mailing list