Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 12, 13:15 UTC
Second half of 6dce493
Not sure how it got unstaged
Matthew Holt committed
May 10, 2024 at 15:51 UTC
399186abfce674ceccb7c9197fa11158d101f485
1 file changed
+5
-2
modules/caddyhttp/server.go
+5
-2
@@ -787,8 +787,11 @@ func (s *Server) logRequest(
787
if wrec.Status() >= 400 {
788
logAtLevel = logger.Error
789
}
790
-
791
- logAtLevel("handled request", fields...)
790
+ message := "handled request"
791
+ if nop, ok := GetVar(r.Context(), "unhandled").(bool); ok && nop {
792
+ message = "NOP"
793
+ }
794
+ logAtLevel(message, fields...)
795
}
796
}
797