Commit graph

276 commits

Author SHA1 Message Date
Adrian Perez de Castro
04936f197b
CI: Update mainline Nginx to 1.11.6 2016-12-08 15:33:17 +02:00
Adrian Perez de Castro
b1182f7758
Add test case 2016-12-08 15:33:13 +02:00
Adrian Perez
57ff1a2a89 Merge pull request #62 from 0xb8/fix-61
Fix segfaults when opening directories with empty files
2016-12-08 15:12:51 +02:00
cat
a551b5e3ea Fix segfaults when opening directories with empty files
Apparently ngx_sprintf does not tolerate format specifiers
not matching their corresponding argument types.
2016-12-08 15:15:59 +05:00
Adrian Perez de Castro
ee17ca1a65
Use in tests the generic method to pass config options
Instead of having variables being flipped around, just specify which Nginx
directives are needed in the configuration file.
2016-12-07 20:20:34 +02:00
Adrian Perez de Castro
5b53c2b0b2
Use ↓ entity references instead of character references
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.
2016-12-07 19:18:11 +02:00
Adrian Perez de Castro
77d2c60c8e
CI: Update to Nginx stable 1.10.2 and mainline 1.11.5 2016-11-06 20:57:49 +02:00
Anders Trier Olesen
6442f26527 Add test for fancyindex_exact_size off 2016-11-04 01:31:05 +02:00
Anders Trier
1e438a694d Add decimal to file sizes 2016-11-04 01:31:05 +02:00
Fernando Costa
f2f0cdc9de Randomize test execution. 2016-10-18 23:51:08 +03:00
Adrian Perez de Castro
c5deb79e8f
Remove usage of cellpadding/cellspacing in default template
This closes issue #52
2016-08-31 02:26:58 +03:00
Adrian Perez de Castro
bdaceb6583
Do not use col/colgroup tags in default template
Avoid using <colgroup> and <col> tags, which are deprecated in favour
of using CSS for styling.

See issue #52 for more information.
2016-08-31 02:23:54 +03:00
Adrian Perez de Castro
a3a7626de9
Use the HTML5 document type declaration
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.
2016-08-31 02:07:10 +03:00
Adrian Perez de Castro
71b7146577
Release version 0.4.1 2016-08-18 20:49:47 +03:00
Adrian Perez de Castro
0a8450c812
Travis-CI: Use the t/build-and-run script
This ensures that Travis-CI uses the same commands for building and testing as
developers are encouraged to.
2016-08-18 20:42:13 +03:00
Adrian Perez de Castro
5e621202bd
Use only the new-style module configuration for dynamic builds
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.
2016-08-18 20:30:43 +03:00
Adrian Perez de Castro
3ec11d5d87
config: Depend also on template.h
This makes the Nginx configure script add a rule to the generated Makefile which
makes the module depend on template.h
2016-08-18 19:22:03 +03:00
Adrian Perez de Castro
07fb4ab214
t/run: Add some spacing and formatting to failed test outputs
This makes it easier to identify the outputs for each one of the failed
tests.
2016-08-18 19:19:11 +03:00
Adrian Perez de Castro
a1bb63c93b
Script which replicates the build-and-test done by Travis-CI
This allows developers to build nginx and run the test suite locally by
running just one single command.
2016-08-18 18:16:30 +03:00
Adrian Perez de Castro
f051caa108
Tests: Add test descriptions 2016-08-18 18:16:16 +03:00
Adrian Perez de Castro
038434dd9f
Ensure that a clean environment is used to launch Nginx in tests
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.
2016-08-18 16:48:28 +03:00
Adrian Perez de Castro
3789187861
Tests: Smoke-test that the module is returning data 2016-08-18 00:44:07 +03:00
Adrian Perez de Castro
8d47b33509
Tests: Check that dynamic module is not built when build is not dynamic 2016-08-18 00:44:07 +03:00
Adrian Perez de Castro
3c70b9f5c8
Travis-CI: Use individual script steps, to allow collapsing them in the log 2016-08-18 00:44:07 +03:00
Adrian Perez de Castro
85ad712764
Tests: Move preamble out of t/run 2016-08-18 00:44:07 +03:00
Adrian Perez de Castro
3df2d5f715
CI: Install built Nginx ina prefix directory and invoke test harness 2016-08-18 00:44:07 +03:00
Adrian Perez de Castro
866a9e18a0
Add a rudimentary test harness 2016-08-18 00:44:06 +03:00
Adrian Perez de Castro
7dd46a6dd2
CI: Build the module dynamically as well 2016-08-18 00:44:06 +03:00
Adrian Perez de Castro
0fd28d123e
CI: Build also with Nginx 1.11.3 2016-08-18 00:43:54 +03:00
Adrian Perez de Castro
47131b01d1
CHANGELOG: Mention fancyindex_directories_first directive 2016-08-18 00:40:43 +03:00
Luke Zapart
2fa65b05f1
Add fancyindex_directories_first config directive.
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.
2016-08-18 00:36:24 +03:00
Adrian Perez
73e67974ec Merge pull request #45 from nwrd/master
fix readme file
2016-06-26 22:01:54 +03:00
nwrd
1e037c8fba fix readme file 2016-06-26 19:08:36 +02:00
Adrian Perez de Castro
4f9058da72
Release version 0.4.0 2016-06-08 17:28:40 +03:00
Adrian Perez de Castro
ba8ca3b540
CHANGELOG: Fix typo 2016-06-08 17:17:00 +03:00
Adrian Perez de Castro
022c117576
README: Mention the possibility of compiling as dynamic module 2016-06-08 16:04:41 +03:00
Adrian Perez de Castro
aa18095ffc
Change the build status badge to use the Travis-CI one
Travis-CI better signifies the build status, as it tries building with
combinations of compilers, nginx versions, and dynamic vs. statically
linked modules.
2016-06-08 15:49:09 +03:00
Adrian Perez
06eda48a62 Merge pull request #44 from vrnagy/master
Support to be built as dynamic module
2016-06-08 15:40:04 +03:00
Róbert Nagy
0e5f7c00b6 Dynamic module config 2016-05-23 23:39:24 +02:00
Róbert Nagy
7ca820ec4d Test dynamic module build 2016-05-23 23:38:00 +02:00
Róbert Nagy
9d34233ff4 Test with nginx 1.8.1, 1.9.15, 1.10.0 2016-05-23 23:29:53 +02:00
Adrian Perez
ba8b4ece63 Merge pull request #39 from TPXP/add_show_path
Add the 'show_path' configuration directive
2016-02-16 01:31:04 +02:00
Thomas P
cb3d21157b Add the 'show_path' configuration directive
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
2016-02-13 15:37:54 +01:00
Adrián Pérez de Castro
80bd501bbf Travis-CI: Add configuration 2016-02-10 18:55:26 +02:00
Adrián Pérez de Castro
891fb05fc9 Update CHANGELOG with latest merges 2016-02-10 16:23:21 +02:00
Adrian Perez
945f87c644 Merge pull request #31 from janglapuk/master
Add title attribute for each dir or file
2016-02-10 15:54:04 +02:00
Adrian Perez
c8e9a9a158 Merge pull request #37 from oschaaf/ngx-pagespeed-compatibility
Fix hang when combining fancyindex with ngx_pagespeed
2016-02-10 15:46:00 +02:00
Otto van der Schaaf
1450c1b4d5 Fix hang when combining fancyindex with ngx_pagespeed
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.
2016-02-10 13:15:30 +01:00
Adrián Pérez de Castro
c97e11ad6c Release version 0.3.6 2016-01-26 18:53:05 +02:00
Adrián Pérez de Castro
61f091aeb8 Update year to 2016 in copyright header 2016-01-26 18:52:54 +02:00