caddy/caddyhttp/httpserver
Matt Holt 4b1b329edb templates: Execute template loaded by later middlewares (#1649)
* templates: Execute template loaded by later middlewares

This is the beginning of an attempt to make the staticfiles file server
the only middleware that hits the disk and loads content. This may have
unknown implications. But the goal is to reduce duplication without
sacrificing performance. (We now call ServeContent here.)

This change loses about 15% of the req/sec of the old way of doing it,
but this way is arguably more correct since the file server is good at
serving static files; duplicating that logic in every middleware that
needs to hit the disk is not practical.

* httpserver: Introduce ResponseRecorder as per Tw's suggestions

It implements io.ReaderFrom and has some allocation-reducing
optimizations baked into it

* templates: Increase execution speed by ~10-15% after perf regression

By using httpserver.ResponseBuffer, we can reduce allocations and still
get what we want. It's a little tricky but it works so far.
2017-08-24 07:13:53 -06:00
..
condition_test.go Changed IfCond to store the condition function and the compiled regular expression. 2017-08-03 11:59:30 +01:00
condition.go Changed IfCond to store the condition function and the compiled regular expression. 2017-08-03 11:59:30 +01:00
error.go proxy: recognize client's cancellation 2017-04-30 10:14:19 +08:00
https_test.go httpserver: Proper HTTP->HTTPS for wildcard sites (fixes #1625) 2017-04-26 12:32:15 -06:00
https.go SIGUSR2 triggers graceful binary upgrades (spawns new process) (#1814) 2017-08-12 11:04:32 -06:00
logger_test.go Vendor all dependencies (Warning: Huge changeset.) 2017-05-27 13:30:11 -06:00
logger.go httpserver: Don't close stdout or stderr when closing logs (fix #1471) 2017-04-18 16:01:11 -06:00
middleware_test.go Rewrote Caddy from the ground up; initial commit of 0.9 branch 2016-06-04 17:00:29 -06:00
middleware.go Create request_id directive #1590 (#1711) 2017-06-24 13:54:35 -07:00
mitm_test.go mitm: Fix out of bounds error when checking software version in UA 2017-07-25 13:00:49 -06:00
mitm.go mitm: Fix out of bounds error when checking software version in UA 2017-07-25 13:00:49 -06:00
path_test.go fastcgi: Prepend missing leading slash when matching paths (see #1645) 2017-05-02 11:20:50 -06:00
path.go httpserver: Base path of "/" matches all paths, even empty ones 2017-05-02 09:43:43 -06:00
plugin_test.go Bugfix for issue #1628 where Caddyfile is not being hidden correctly on windows. 2017-05-01 14:21:49 +01:00
plugin.go templates: Execute template loaded by later middlewares (#1649) 2017-08-24 07:13:53 -06:00
recorder_test.go Rewrote Caddy from the ground up; initial commit of 0.9 branch 2016-06-04 17:00:29 -06:00
recorder.go templates: Execute template loaded by later middlewares (#1649) 2017-08-24 07:13:53 -06:00
replacer_test.go adds unix timestamp placeholder 2017-07-05 22:08:07 +02:00
replacer.go adds unix timestamp placeholder 2017-07-05 22:08:07 +02:00
responsewriterwrapper.go ResponseWriterWrapper and HTTPInterfaces (#1644) 2017-05-05 09:42:06 -06:00
roller.go log,error: fix roller parser issue 2017-07-20 15:21:06 +08:00
server_test.go Vendor all dependencies (Warning: Huge changeset.) 2017-05-27 13:30:11 -06:00
server.go Avoid panic on QUIC server close (fixes #1805) 2017-08-03 11:20:14 -06:00
siteconfig.go httpserver: Set default idle timeout of 5 minutes (closes #1733) 2017-07-27 16:01:47 -06:00
tplcontext_test.go httpserver: rename context Push action for more general use (#1641) 2017-05-05 17:36:20 -06:00
tplcontext.go httpserver: rename context Push action for more general use (#1641) 2017-05-05 17:36:20 -06:00
vhosttrie_test.go Rewrote Caddy from the ground up; initial commit of 0.9 branch 2016-06-04 17:00:29 -06:00
vhosttrie.go Move fallbackHosts to vhostTrie 2017-07-27 17:23:13 -04:00