Added function to sanitize strings by escaping quotes (#2360)

This commit is contained in:
Ankit Chawla
2022-02-21 12:44:27 +05:30
committed by GitHub
parent f45d85f30a
commit fe5e5f592b
7 changed files with 61 additions and 1 deletions
+2
View File
@@ -295,6 +295,7 @@ func (roundTripper *RetryingRoundTripper) RoundTrip(req *http.Request) (*http.Re
req.URL.Path = "/"
}
req.URL.Path = utils.EscapeQuotes(req.URL.Path)
logger.Debug("function invoke url",
zap.String("prefixTrim", prefixTrim),
zap.Bool("keepPrefix", keepPrefix),
@@ -386,6 +387,7 @@ func (roundTripper *RetryingRoundTripper) RoundTrip(req *http.Request) (*http.Re
// Check whether an error is an timeout error ("dial tcp i/o timeout").
if isNetTimeoutErr {
req.URL.Host = utils.EscapeQuotes(req.URL.Host)
logger.Debug("request errored out - backing off before retrying",
zap.String("url", req.URL.Host),
zap.Error(err))