caddy/caddyhttp
ericdreeves 08c17c7c31 Add Files action to template context. (closes #1198) (#1226)
* Add Files action to template context. (#1198)

* Fixes to testFiles().

- Set os.ModePerm on directories created during test.
- Use filepath.Join() to create directory path.
- Use Fatalf, not Fatal.

* Make additional fixes to test cases.

* Fix test cases to use correct path format.

Dir.Open() in net/http requires '/'-separated paths while
filepath.Join() may produce paths with different separator.

* Remove directory created by test at end of loop.

* Close the FileSystem before returning.

* Initialize names slice to the number of entries.

Also, do not call os.RemoveAll() unless the path to the directory
is a valid one.
2016-11-01 22:04:53 -06:00
..
basicauth Fix misspellings 2016-09-05 10:20:34 -06:00
bind Refactor how caddy.Context is stored and used 2016-06-20 11:59:23 -06:00
browse Remove dead code, do struct alignment, simplify code 2016-10-25 19:19:54 +02:00
errors errors: don't join the absolute file path 2016-10-18 09:55:50 +08:00
expvar Refactor how caddy.Context is stored and used 2016-06-20 11:59:23 -06:00
extensions Fix misspellings 2016-09-05 10:20:34 -06:00
fastcgi Remove dead code, do struct alignment, simplify code 2016-10-25 19:19:54 +02:00
gzip add more descriptive errors 2016-10-11 10:34:51 +08:00
header add more descriptive errors 2016-10-11 10:34:51 +08:00
httpserver Add Files action to template context. (closes #1198) (#1226) 2016-11-01 22:04:53 -06:00
internalsrv Enable downloading of protected content. See issue #979 (#980) 2016-08-07 23:16:33 -06:00
log Use proper Request (#1197) 2016-10-25 09:28:53 -06:00
markdown Remove dead code, do struct alignment, simplify code 2016-10-25 19:19:54 +02:00
mime Refactor how caddy.Context is stored and used 2016-06-20 11:59:23 -06:00
pprof Fix misspellings 2016-09-05 10:20:34 -06:00
proxy Remove dead code, do struct alignment, simplify code 2016-10-25 19:19:54 +02:00
redirect Fix misspellings 2016-09-05 10:20:34 -06:00
rewrite Remove dead code, do struct alignment, simplify code 2016-10-25 19:19:54 +02:00
root Refactor how caddy.Context is stored and used 2016-06-20 11:59:23 -06:00
staticfiles Eliminate ineffectual assignments 2016-09-05 10:30:46 -06:00
status Add 'status' middleware instead of 'status' directive for 'rewrite' middleware 2016-08-29 17:17:23 +03:00
templates Refactor how caddy.Context is stored and used 2016-06-20 11:59:23 -06:00
websocket Fix misspellings 2016-09-05 10:20:34 -06:00
caddyhttp_test.go Add 'status' middleware instead of 'status' directive for 'rewrite' middleware 2016-08-29 17:17:23 +03:00
caddyhttp.go Add 'status' middleware instead of 'status' directive for 'rewrite' middleware 2016-08-29 17:17:23 +03:00