excon 0.27.3 → 0.27.4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of excon might be problematic. Click here for more details.
- data/Gemfile.lock +1 -1
- data/changelog.txt +5 -0
- data/excon.gemspec +2 -2
- data/lib/excon.rb +1 -0
- data/lib/excon/constants.rb +1 -1
- data/lib/excon/ssl_socket.rb +2 -2
- data/tests/errors_tests.rb +9 -0
- metadata +3 -3
data/Gemfile.lock
CHANGED
data/changelog.txt
CHANGED
data/excon.gemspec
CHANGED
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'excon'
|
16
|
-
s.version = '0.27.
|
17
|
-
s.date = '2013-10-
|
16
|
+
s.version = '0.27.4'
|
17
|
+
s.date = '2013-10-14'
|
18
18
|
s.rubyforge_project = 'excon'
|
19
19
|
|
20
20
|
## Make sure your summary is short. The description may be as long
|
data/lib/excon.rb
CHANGED
@@ -131,6 +131,7 @@ module Excon
|
|
131
131
|
def new(url, params = {})
|
132
132
|
uri_parser = params[:uri_parser] || Excon.defaults[:uri_parser]
|
133
133
|
uri = uri_parser.parse(url)
|
134
|
+
raise ArgumentError.new("Invalid URI: #{uri}") unless uri.scheme
|
134
135
|
params = {
|
135
136
|
:host => uri.host,
|
136
137
|
:path => uri.path,
|
data/lib/excon/constants.rb
CHANGED
data/lib/excon/ssl_socket.rb
CHANGED
@@ -51,8 +51,8 @@ module Excon
|
|
51
51
|
end
|
52
52
|
|
53
53
|
if @data[:proxy]
|
54
|
-
request = 'CONNECT ' << @data[:host] <<
|
55
|
-
request << 'Host: ' << @data[:host] <<
|
54
|
+
request = 'CONNECT ' << @data[:host] << @data[:connection].send(:port_string, @data) << Excon::HTTP_1_1
|
55
|
+
request << 'Host: ' << @data[:host] << @data[:connection].send(:port_string, @data) << Excon::CR_NL
|
56
56
|
|
57
57
|
if @data[:proxy][:password] || @data[:proxy][:user]
|
58
58
|
auth = ['' << @data[:proxy][:user].to_s << ':' << @data[:proxy][:password].to_s].pack('m').delete(Excon::CR_NL)
|
data/tests/errors_tests.rb
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
Shindo.tests('HTTPStatusError request/response debugging') do
|
2
2
|
|
3
|
+
tests('new raises errors for bad URIs').returns(true) do
|
4
|
+
begin
|
5
|
+
Excon.new('foo')
|
6
|
+
false
|
7
|
+
rescue => err
|
8
|
+
err.to_s.include? 'foo'
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
3
12
|
with_server('error') do
|
4
13
|
|
5
14
|
tests('message does not include response or response info').returns(true) do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: excon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.27.
|
4
|
+
version: 0.27.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-10-
|
14
|
+
date: 2013-10-14 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|
@@ -243,7 +243,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
243
243
|
version: '0'
|
244
244
|
segments:
|
245
245
|
- 0
|
246
|
-
hash: -
|
246
|
+
hash: -4082744813762939124
|
247
247
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
248
248
|
none: false
|
249
249
|
requirements:
|