From ec66cc47d5996c4fbdec60c2544e7ccb209b5d3a Mon Sep 17 00:00:00 2001 From: zelig Date: Sat, 3 Feb 2024 16:58:07 +0100 Subject: [PATCH] fix(api): return after Serve --- pkg/api/bzz.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/api/bzz.go b/pkg/api/bzz.go index f94de54ae4b..67a80a58918 100644 --- a/pkg/api/bzz.go +++ b/pkg/api/bzz.go @@ -295,7 +295,7 @@ func (s *Service) serveReference(logger log.Logger, address swarm.Address, pathV Strategy getter.Strategy `map:"Swarm-Redundancy-Strategy"` FallbackMode bool `map:"Swarm-Redundancy-Fallback-Mode"` ChunkRetrievalTimeout string `map:"Swarm-Chunk-Retrieval-Timeout"` - LookaheadBufferSize string `map:"Swarm-Lookahead-Buffer-Size"` + LookaheadBufferSize *string `map:"Swarm-Lookahead-Buffer-Size"` }{} if response := s.mapStructure(r.Header, &headers); response != nil { @@ -532,6 +532,7 @@ func (s *Service) downloadHandler(logger log.Logger, w http.ResponseWriter, r *h } if bufSize > 0 { http.ServeContent(w, r, "", time.Now(), langos.NewBufferedLangos(reader, int(bufSize))) + return } http.ServeContent(w, r, "", time.Now(), reader) }