diff options
author | Matthew Holt <[email protected]> | 2019-11-04 13:43:39 -0700 |
---|---|---|
committer | Matthew Holt <[email protected]> | 2019-11-04 13:43:39 -0700 |
commit | f5c6a8553c5b6cbf2e2a58307b78ff06282d0737 (patch) | |
tree | 4a6241de6d55274d904b93f1639b95b0405ab237 | |
parent | 263ffbfaecc5ed8b7f5071baecf51b4e9d90e7bf (diff) | |
download | caddy-2.0.0-beta9.tar.gz caddy-2.0.0-beta9.zip |
Prepare for beta 9 tagv2.0.0-beta9
-rw-r--r-- | caddyconfig/httpcaddyfile/directives.go | 8 | ||||
-rw-r--r-- | modules/caddyhttp/server.go | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/caddyconfig/httpcaddyfile/directives.go b/caddyconfig/httpcaddyfile/directives.go index e56d101fa..acdca20a9 100644 --- a/caddyconfig/httpcaddyfile/directives.go +++ b/caddyconfig/httpcaddyfile/directives.go @@ -64,8 +64,12 @@ func RegisterHandlerDirective(dir string, setupFunc UnmarshalHandlerFunc) { return nil, err } if ok { - tokens := h.Dispenser.Delete() // strip matcher token - h.Dispenser = caddyfile.NewDispenser(tokens) + // strip matcher token; we don't need to + // use the return value here because a + // new dispenser should have been made + // solely for this directive's tokens, + // with no other uses of same slice + h.Dispenser.Delete() } h.Dispenser.Reset() // pretend this lookahead never happened diff --git a/modules/caddyhttp/server.go b/modules/caddyhttp/server.go index 2d9d82768..38d6eddb0 100644 --- a/modules/caddyhttp/server.go +++ b/modules/caddyhttp/server.go @@ -116,7 +116,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { log = logger.Error } - log("request", + log("received request", zap.String("common_log", repl.ReplaceAll(CommonLogFormat, "-")), zap.Duration("latency", latency), zap.Int("size", wrec.Size()), |