From 9d5ea0ebd35583ae04f274a5a79c88df0d6b6bc3 Mon Sep 17 00:00:00 2001 From: Benjamin FERNANDEZ Date: Thu, 7 Sep 2023 16:18:38 +0200 Subject: [PATCH] Missing bufio library --- server/server.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/server.go b/server/server.go index 29fd4141d6..211eb38895 100644 --- a/server/server.go +++ b/server/server.go @@ -1,6 +1,7 @@ package server import ( + "bufio" "context" "crypto/rsa" "encoding/json" @@ -367,9 +368,9 @@ func newServer(ctx context.Context, c Config, rotationStrategy rotationStrategy) bufferSizeMidldleware := func(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w := bufio.NewWriterSize(w, 4096*2) - if w.Buffered() > 0 { - w.Flush() - } + if w.Buffered() > 0{ + w.Flush() + } next.ServeHTTP(w, r) }) }