Skip to content

Commit

Permalink
Fix: Write response headers from copy of internal response's headers (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dleviminzi authored Dec 19, 2024
1 parent ef1d97f commit d93a6e8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/abstractions/endpoint/buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,15 @@ func (rb *RequestBuffer) handleHttpRequest(req *request, c container) {

defer resp.Body.Close()

// Write response headers
responseHeaders := make(http.Header)
for key, values := range resp.Header {
for _, value := range values {
responseHeaders.Add(key, value)
}
}

// Write response headers
for key, values := range responseHeaders {
for _, value := range values {
req.ctx.Response().Writer.Header().Add(key, value)
}
Expand Down

0 comments on commit d93a6e8

Please sign in to comment.