File tree 2 files changed +7
-8
lines changed
2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,7 @@ class HttpClient
18
18
:secure => true ,
19
19
:path_prefix => '/' ,
20
20
:http_read_timeout => 15 ,
21
- :http_open_timeout => 5 ,
22
- :http_ssl_version => :TLSv1
21
+ :http_open_timeout => 5
23
22
}
24
23
25
24
def initialize ( api_token , options = { } )
@@ -107,7 +106,7 @@ def build_http
107
106
http . read_timeout = self . http_read_timeout
108
107
http . open_timeout = self . http_open_timeout
109
108
http . use_ssl = !!self . secure
110
- http . ssl_version = self . http_ssl_version if http . respond_to? ( :ssl_version= )
109
+ http . ssl_version = self . http_ssl_version if self . http_ssl_version && http . respond_to? ( :ssl_version= )
111
110
http
112
111
end
113
112
end
Original file line number Diff line number Diff line change @@ -42,9 +42,9 @@ def response_body(status, message = "")
42
42
its ( :http_read_timeout ) { is_expected . to eq 15 }
43
43
its ( :http_open_timeout ) { is_expected . to eq 5 }
44
44
45
- it 'use default TLS encryption ' , :skip_ruby_version => [ '1.8.7' ] do
45
+ it 'does not provide a default which utilizes the Net::HTTP default ' , :skip_ruby_version => [ '1.8.7' ] do
46
46
http_client = subject . http
47
- expect ( http_client . ssl_version ) . to eq :TLSv1
47
+ expect ( http_client . ssl_version ) . to eq nil
48
48
end
49
49
end
50
50
@@ -140,7 +140,7 @@ def response_body(status, message = "")
140
140
:status => [ "485" , "Custom HTTP response status" ] )
141
141
expect { subject . post ( target_path ) } . to raise_error Postmark ::UnknownError
142
142
end
143
-
143
+
144
144
end
145
145
146
146
describe "#get" do
@@ -180,7 +180,7 @@ def response_body(status, message = "")
180
180
:status => [ "485" , "Custom HTTP response status" ] )
181
181
expect { subject . get ( target_path ) } . to raise_error Postmark ::UnknownError
182
182
end
183
-
183
+
184
184
end
185
185
186
186
describe "#put" do
@@ -223,4 +223,4 @@ def response_body(status, message = "")
223
223
expect { subject . put ( target_path ) } . to raise_error Postmark ::UnknownError
224
224
end
225
225
end
226
- end
226
+ end
You can’t perform that action at this time.
0 commit comments