Skip to content

Commit a046fe8

Browse files
committed
added further debugging for Body templating
1 parent eb474d6 commit a046fe8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

internals/proxy/proxy.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,13 +194,15 @@ func TemplatingMiddleware(next http.Handler, VARIABLES map[string]string) http.H
194194
}
195195

196196
log.Debug("Applied Query Templating: ", query)
197-
}
198197

199-
log.Debug("Applied Body Templating")
198+
modifiedBody = string(modifiedBodyBytes)
199+
}
200+
201+
log.Debug("Applied Body Templating: ", modifiedBody)
200202

201203
req.Body = io.NopCloser(bytes.NewReader(modifiedBodyBytes))
202204

203-
req.ContentLength = int64(len(string(modifiedBodyBytes)))
205+
req.ContentLength = int64(len(modifiedBody))
204206
req.Header.Set("Content-Length", strconv.Itoa(len(modifiedBody)))
205207
}
206208

0 commit comments

Comments
 (0)