excon 0.0.11 → 0.0.12
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/VERSION +1 -1
- data/excon.gemspec +2 -2
- data/lib/excon/connection.rb +4 -3
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.12
|
data/excon.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{excon}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.12"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Wesley Beary"]
|
12
|
-
s.date = %q{2009-12-
|
12
|
+
s.date = %q{2009-12-11}
|
13
13
|
s.description = %q{speed, persistence, http(s)}
|
14
14
|
s.email = %q{wbeary@engineyard.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/excon/connection.rb
CHANGED
@@ -43,8 +43,8 @@ unless Excon.mocking?
|
|
43
43
|
while true
|
44
44
|
data = connection.readline.chop!
|
45
45
|
unless data.empty?
|
46
|
-
|
47
|
-
response.headers[
|
46
|
+
key, value = data.split(': ')
|
47
|
+
response.headers[key] = value
|
48
48
|
else
|
49
49
|
break
|
50
50
|
end
|
@@ -64,7 +64,7 @@ unless Excon.mocking?
|
|
64
64
|
end
|
65
65
|
elsif response.headers['Transfer-Encoding'] == 'chunked'
|
66
66
|
while true
|
67
|
-
chunk_size = connection.readline.
|
67
|
+
chunk_size = connection.readline.chop!.to_i(16)
|
68
68
|
chunk = connection.read(chunk_size + 2).chop! # 2 == "/r/n".length
|
69
69
|
if chunk_size > 0
|
70
70
|
params[:block].call(chunk)
|
@@ -83,6 +83,7 @@ unless Excon.mocking?
|
|
83
83
|
end
|
84
84
|
|
85
85
|
if params[:expects] && ![*params[:expects]].include?(response.status)
|
86
|
+
Thread.current[:_excon_connection] = nil
|
86
87
|
raise(Excon::Errors.status_error(params, response))
|
87
88
|
else
|
88
89
|
response
|
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.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wesley Beary
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-12-
|
12
|
+
date: 2009-12-11 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|