Skip to content

Commit

Permalink
fix: multiple content-length of http response in mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
gouravkrosx committed Jan 12, 2024
1 parent ce21538 commit 71b043b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/proxy/integrations/httpparser/httpparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -775,8 +775,8 @@ func ParseFinalHttp(finalReq []byte, finalResp []byte, reqTimestampMock, resTime
return err
}
logger.Debug("This is the response body: " + string(respBody))
//Add the content length to the headers.
respParsed.Header.Add("Content-Length", strconv.Itoa(len(respBody)))
//Set the content length to the headers.
respParsed.Header.Set("Content-Length", strconv.Itoa(len(respBody)))
}
// store the request and responses as mocks
meta := map[string]string{
Expand Down

0 comments on commit 71b043b

Please sign in to comment.