Entity references are encoding-independent, and will work despite of the
encoding of the rest of the served document. Note that in general it may be
a bad idea to use "fancyindex_header" to change the encoding of the served
documents because file names will still be treated as UTF-8, which is the
only sane default in Unix.
Fixes#50.
The XHTML document makes the document not to validate because of the undefined
entity references, and it seems better to use the HTML5 document type instead
of the HTML 4.01 one because the template uses already some modern constructs
like defining the device viewport options.
Fixes issue #52.
For static builds we still need to manually reorder $HTTP_MODULES, and we
cannot source "auto/module" like the new-style configuration mode needs,
because the "auto/module" snippet modifies $HTTP_MODULES itself, but ignores
the new $ngx_module_order variable when doing a static build.
Fortunately, the old-style way of configuring the module is still working in
all Nginx versions for statically built modules, so we can keep using that
for static builds.
This fixes issue #46.
This avoids potential issues when running the tests in environments which
might set variables which Nginx tries to read on startup. For example,
the $NGINX variable was being picked from the Travis-CI build matrix
configuration.
The fancyindex_directories_first directive allows one to enable or
disable grouping directories first before all files when sorting.
This is accomplished by changing the sort function from ngx_qsort (which
is the plain stdlib qsort under the hood) to ngx_sort which is a stable
insertion sort (per ngx_string.c).
We call ngx_sort with the standard sort_cmp_func (albeit modified to remove
grouping dirs), and then, if fancyindex_directories_first is set, call
ngx_sort again with ngx_http_fancyindex_cmp_entries_dirs_first which sorts
entries according to the directories first criterion.
Because a stable sorting function is used, the relative primary order is
preserved when we call ngx_sort again.
Change int (*sort_cmp_func) (const void*, const void*) to ngx_int_t
(*sort_cmp_func) (const void*, const void*) to satisfy ngx_sort.
Travis-CI better signifies the build status, as it tries building with
combinations of compilers, nginx versions, and dynamic vs. statically
linked modules.
This directive enables someone using a custom header to disable the output of the indexed directory by the module
Useful when you want to create links to previous directories via PHP for example
This attempts to address hanging requests when fancyindex is
combined with ngx_pagespeed. The change makes fancyindex check
the return value of ngx_http_send_header in a way that is just
the same as nginx's autoindex module - which makes the modules
work for me when I test with ngx_pagespeed.