From 653e69d734566578402d9529258153e8bd717997 Mon Sep 17 00:00:00 2001 From: Jessica Jiang Date: Thu, 15 Jul 2021 15:47:13 -0700 Subject: [PATCH] Overwrite socket data if already initialized --- lib/excon/connection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/excon/connection.rb b/lib/excon/connection.rb index 7ca064d8..1e3f4400 100644 --- a/lib/excon/connection.rb +++ b/lib/excon/connection.rb @@ -115,7 +115,7 @@ def request_call(datum) # we already have data from a middleware, so bail return datum else - socket(datum) + socket(datum).data = datum # start with "METHOD /path" request = datum[:method].to_s.upcase + ' ' if datum[:proxy] && datum[:scheme] != HTTPS