summaryrefslogtreecommitdiff
path: root/modules/caddyhttp
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-09-06 12:02:11 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-09-06 12:02:11 -0600
commit21d7b662e76feeb506cae9a616d92d85326566bd (patch)
treed2096d7f8d1f2d263ca65ea9eb2d17cdabf51e40 /modules/caddyhttp
parentd2e46c2be0c72cf49d87a9c70400ff65046e5123 (diff)
fastcgi: Use request context as base, not a new one
Diffstat (limited to 'modules/caddyhttp')
-rw-r--r--modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go b/modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go
index 9d724c1..0368fde 100644
--- a/modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go
+++ b/modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go
@@ -92,7 +92,7 @@ func (t Transport) RoundTrip(r *http.Request) (*http.Response, error) {
}
// TODO: doesn't dialer have a Timeout field?
- ctx := context.Background()
+ ctx := r.Context()
if t.DialTimeout > 0 {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, time.Duration(t.DialTimeout))