From 146eeee07022d00dd4ac34fdc6b7ce5f0479a373 Mon Sep 17 00:00:00 2001 From: sneak Date: Thu, 8 Jan 2026 02:26:47 -0800 Subject: [PATCH] Use bit shift for HTTPMaxHeaderBytes constant --- internal/server/http.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/server/http.go b/internal/server/http.go index edee7ae..6c37fde 100644 --- a/internal/server/http.go +++ b/internal/server/http.go @@ -8,9 +8,9 @@ import ( // HTTP server configuration constants. const ( - HTTPReadTimeout = 30 * time.Second - HTTPWriteTimeout = 60 * time.Second - HTTPMaxHeaderKB = 8 + HTTPReadTimeout = 30 * time.Second + HTTPWriteTimeout = 60 * time.Second + HTTPMaxHeaderBytes = 8 << 10 // 8KB ) func (s *Server) serveUntilShutdown() { @@ -19,7 +19,7 @@ func (s *Server) serveUntilShutdown() { Addr: listenAddr, ReadTimeout: HTTPReadTimeout, WriteTimeout: HTTPWriteTimeout, - MaxHeaderBytes: HTTPMaxHeaderKB * 1024, + MaxHeaderBytes: HTTPMaxHeaderBytes, Handler: s, }