From 56474377bea9fdda2e07f52c169f4500e8c2be36 Mon Sep 17 00:00:00 2001 From: jasquat Date: Thu, 21 Nov 2019 16:12:04 -0500 Subject: [PATCH] fixed response status check when making a request with a valid proxy is set --- lib/excon/ssl_socket.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/excon/ssl_socket.rb b/lib/excon/ssl_socket.rb index 192c5d7e..8ec32401 100644 --- a/lib/excon/ssl_socket.rb +++ b/lib/excon/ssl_socket.rb @@ -108,7 +108,7 @@ def initialize(data = {}) # eat the proxy's connection response response = Excon::Response.parse(self, :expects => 200, :method => 'CONNECT') - if response[:status] != 200 + if response[:response][:status] != 200 raise(Excon::Errors::ProxyConnectionError.new("proxy connection is not exstablished")) end end