Commit Graph

162 Commits (0a8450c812b7d8b9acbd54120e3e66d35b8508e6)

Author SHA1 Message Date
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
Adrian Perez 29e039e787 Merge pull request #35 from yzwduck/master
Fix Windows builds
2016-01-26 18:43:55 +02:00
YeahO_O Yuan bbd0300488 Fix Windows builds
Suppress warnings for:
* non-ascii character;
* non-constant aggregate initializer;
* assignment within conditional expression;
* return value type mismatch.
2016-01-25 19:45:06 +08:00
janglapuk 07c4288e64 Added title attribute for each dir or file 2015-08-30 10:29:30 +08:00
stayn0ided 69105c65d8 fixed readme theme section 2015-08-23 12:51:47 +02:00
Peter Wemm e5deb93745 Fix typo in fancyindex_hide_symlinks that causes a crash. 2015-08-16 21:18:13 -07:00
Adrian Perez de Castro 4d0200d22c README: Add one more theme 2015-08-17 01:08:23 +03:00
Adrian Perez de Castro db017f815c CHANGELOG: Fix subsubsection spacing 2015-08-17 00:27:10 +03:00
Adrian Perez de Castro c0c6d8bfc4 CHANGELOG: Make version numbers clickable 2015-08-17 00:25:28 +03:00
Adrian Perez de Castro 3f93d1f01d Fix propagation of fancyindex_css_href configuration directive
The value for fancyindex_css_href was not being propagated properly, so
overriding its value did not work as expected. For example the following
configuration:

    http {
	# ...
	fancyindex_css_href "/css/global.css";

	location /subdir/ {
	    fancyindex_css_href "/css/local.css";
	}
    }

would always use "global.css", even when accessing file listings under
"/subdir".

This patch fixes the issue.
2015-08-17 00:20:53 +03:00
Adrian Perez de Castro 5549286d39 Mark unused variables to avoid compiler warnings/errors
This avoids the compiler complaning when warnings for unused variables are
enabled.
2015-08-17 00:15:25 +03:00
Adrian Perez de Castro 13170fb6e6 Fix a couple of code style and indentation issues 2015-08-17 00:14:53 +03:00
Adrian Perez de Castro 5599bbebba Allow specifying timestamp format with fancyindex_time_format
This patch adds a new configuration directive fancyindex_time_format, which
accepts a strftime()-style format string used to format the timestamps in the
generated listings. The accepted format specifiers are an useful subset of
those supported by strftime(), but the libc function is not used to make the
output of the module stable and locale-independent.

This fixes issue #23.
2015-08-16 23:54:32 +03:00
Adrian Perez de Castro fd0bbd7fb8 Fix indentation and spacing 2015-08-16 17:22:19 +03:00
Adrian Perez de Castro cf8197c991 Fix initializer of fancyindex_hide_symlinks flag definition 2015-08-16 17:21:31 +03:00