Skip to content

Commit

Permalink
hotfix for cloning http request context
Browse files Browse the repository at this point in the history
  • Loading branch information
myleshorton committed Dec 10, 2024
1 parent e33e5ad commit 72225de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fronted.go
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ func (ddf *directTransport) RoundTrip(req *http.Request) (resp *http.Response, e
func cloneRequestWith(req *http.Request, frontedHost string, body io.ReadCloser) (*http.Request, error) {
url := *req.URL
url.Host = frontedHost
r, err := http.NewRequest(req.Method, url.String(), body)
r, err := http.NewRequestWithContext(req.Context(), req.Method, url.String(), body)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 72225de

Please sign in to comment.