removing useless count logic
@@ -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
}
