removing useless count logic

This commit is contained in:
mzack 2022-01-02 10:59:54 +01:00
parent 9154dc11bf
commit 810f25f52e

View File

@ -133,7 +133,7 @@ func dump(req *generatedRequest, reqURL string) ([]byte, error) {
// The original req.Body gets modified indirectly by httputil.DumpRequestOut so we set it again to nil if it was empty
// Otherwise redirects like 307/308 would fail (as they require the body to be sent along)
if len(bodyBytes) == 0 {
req.request.Request.ContentLength = int64(len(bodyBytes))
req.request.Request.ContentLength = 0
req.request.Request.Body = nil
}