From 810f25f52e4f95cfd8cd45768a0a95eadb68c506 Mon Sep 17 00:00:00 2001 From: mzack Date: Sun, 2 Jan 2022 10:59:54 +0100 Subject: [PATCH] removing useless count logic --- v2/pkg/protocols/http/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/pkg/protocols/http/utils.go b/v2/pkg/protocols/http/utils.go index 273aec9cf..bee2ef557 100644 --- a/v2/pkg/protocols/http/utils.go +++ b/v2/pkg/protocols/http/utils.go @@ -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 }