Skip to content

Commit eb474d6

Browse files
committed
fix: update Content-Length calculation in TemplatingMiddleware
1 parent a71747e commit eb474d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internals/proxy/proxy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func TemplatingMiddleware(next http.Handler, VARIABLES map[string]string) http.H
200200

201201
req.Body = io.NopCloser(bytes.NewReader(modifiedBodyBytes))
202202

203-
req.ContentLength = int64(len(modifiedBody))
203+
req.ContentLength = int64(len(string(modifiedBodyBytes)))
204204
req.Header.Set("Content-Length", strconv.Itoa(len(modifiedBody)))
205205
}
206206

0 commit comments

Comments
 (0)