Browse Source

Prepare for beta 9 tag

master
Matthew Holt 5 years ago
parent
commit
f5c6a8553c
No known key found for this signature in database GPG Key ID: 2A349DD577D586A5
  1. 8
      caddyconfig/httpcaddyfile/directives.go
  2. 2
      modules/caddyhttp/server.go

8
caddyconfig/httpcaddyfile/directives.go

@ -64,8 +64,12 @@ func RegisterHandlerDirective(dir string, setupFunc UnmarshalHandlerFunc) {
return nil, err return nil, err
} }
if ok { if ok {
tokens := h.Dispenser.Delete() // strip matcher token // strip matcher token; we don't need to
h.Dispenser = caddyfile.NewDispenser(tokens) // 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 h.Dispenser.Reset() // pretend this lookahead never happened

2
modules/caddyhttp/server.go

@ -116,7 +116,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
log = logger.Error log = logger.Error
} }
log("request", log("received request",
zap.String("common_log", repl.ReplaceAll(CommonLogFormat, "-")), zap.String("common_log", repl.ReplaceAll(CommonLogFormat, "-")),
zap.Duration("latency", latency), zap.Duration("latency", latency),
zap.Int("size", wrec.Size()), zap.Int("size", wrec.Size()),

Loading…
Cancel
Save