[PATCH] Add autoindex_css_file option

Adrian Perez the.lightman at gmail.com
Mon Feb 21 15:42:28 MSK 2011


Hello to all,

On Mon, 21 Feb 2011 14:00:04 +0300
Maxim Dounin <mdounin at mdounin.ru> wrote:

> On Mon, Feb 21, 2011 at 01:20:27AM +0100, Clément Bœsch wrote:
> 
> > On Mon, Feb 21, 2011 at 03:08:18AM +0300, Maxim Dounin wrote:
> > > Hello!
> > > 
> > > On Sun, Feb 20, 2011 at 09:47:37PM +0100, Clément Bœsch wrote:
> > > 
> > > [...]
> > > 
> > > >  static u_char title[] =
> > > > -"<html>" CRLF
> > > > +"<!DOCTYPE html>" CRLF
> > > >  "<head><title>Index of "
> > > >  ;
> > > 
> > > The result isn't html at all.
> > > 
> > 
> > Well it's HTML5…
> 
> No it isn't.  You dropped html element.
> 
> Please note that there is also other issues with you patches, you 
> may want spend some more time on them before posting again.

As an alternative, instead of hijacking the autoindex module, you could
use the Fancy Indexes [1] module, and avoid duplicating effort. The
following is actually possible:

  location / {
     fancyindex on;
     fancyindex_css_href /path/to/your.css;
  }

As a bonus, the module outputs listings as tabled, using proper
XHTML 1.0 Strict.

Cheers,

---
[1] http://gitorious.org/ngx-fancyindex
-- 
-Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://nginx.org/pipermail/nginx-devel/attachments/20110221/af8ae127/attachment.pgp>


More information about the nginx-devel mailing list