Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 14, 05:15 UTC
Prepare for beta 9 tag
Matthew Holt committed
Nov 4, 2019 at 13:43 UTC
f5c6a8553c5b6cbf2e2a58307b78ff06282d0737
2 files changed
+7
-3
caddyconfig/httpcaddyfile/directives.go
+6
-2
@@ -64,8 +64,12 @@ func RegisterHandlerDirective(dir string, setupFunc UnmarshalHandlerFunc) {
64
return nil, err
65
}
66
if ok {
67
- tokens := h.Dispenser.Delete() // strip matcher token
68
- h.Dispenser = caddyfile.NewDispenser(tokens)
67
+ // strip matcher token; we don't need to
68
+ // use the return value here because a
69
+ // new dispenser should have been made
70
+ // solely for this directive's tokens,
71
+ // with no other uses of same slice
72
+ h.Dispenser.Delete()
73
}
74
75
h.Dispenser.Reset() // pretend this lookahead never happened
modules/caddyhttp/server.go
+1
-1
@@ -116,7 +116,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
116
log = logger.Error
117
}
118
119
- log("request",
119
+ log("received request",
120
zap.String("common_log", repl.ReplaceAll(CommonLogFormat, "-")),
121
zap.Duration("latency", latency),
122
zap.Int("size", wrec.Size()),