1
0
Fork 0

Fixed stripPrefix middleware is not applied to retried attempts

This commit is contained in:
Никита Тимофеев 2023-11-24 11:30:06 +03:00 committed by GitHub
parent 789046f162
commit f4ddf25e41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 65 additions and 1 deletions

View file

@ -97,7 +97,7 @@ func (r *retry) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
}
newCtx := httptrace.WithClientTrace(req.Context(), trace)
r.next.ServeHTTP(retryResponseWriter, req.WithContext(newCtx))
r.next.ServeHTTP(retryResponseWriter, req.Clone(newCtx))
if !retryResponseWriter.ShouldRetry() {
return nil