Merge current v2.11 into v3.1

This commit is contained in:
romain 2024-08-28 16:11:38 +02:00
commit 85f4fd0979
40 changed files with 114 additions and 116 deletions

View file

@ -62,8 +62,8 @@ func (rp *replacePathRegex) ServeHTTP(rw http.ResponseWriter, req *http.Request)
var err error
req.URL.Path, err = url.PathUnescape(req.URL.RawPath)
if err != nil {
middlewares.GetLogger(context.Background(), rp.name, typeName).Error().Err(err).Send()
observability.SetStatusErrorf(req.Context(), err.Error())
middlewares.GetLogger(context.Background(), rp.name, typeName).Error().Msgf("Unable to unescape url raw path %q: %v", req.URL.RawPath, err)
observability.SetStatusErrorf(req.Context(), "Unable to unescape url raw path %q: %v", req.URL.RawPath, err)
http.Error(rw, err.Error(), http.StatusInternalServerError)
return
}