Skip to content

Commit

Permalink
Set effective content-length for dump (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mzack9999 authored Aug 5, 2023
1 parent 3431517 commit 427e08f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions request.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ func (r *Request) Dump() ([]byte, error) {
clone.ContentLength = 0
clone.Body = nil
delete(clone.Header, "Content-length")
} else {
clone.ContentLength = resplen
}
dumpBytes, err := httputil.DumpRequestOut(clone.Request, dumpbody)
if err != nil {
Expand Down

0 comments on commit 427e08f

Please sign in to comment.