Skip to content

Commit

Permalink
fix(api): return after Serve
Browse files Browse the repository at this point in the history
  • Loading branch information
zelig committed Feb 3, 2024
1 parent 3a47dc6 commit ec66cc4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/api/bzz.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit ec66cc4

Please sign in to comment.