excon 0.47.0 → 0.48.0
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/changelog.txt +5 -0
- data/excon.gemspec +2 -2
- data/lib/excon/connection.rb +18 -1
- data/lib/excon/constants.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f65ecaae53f54ed501b78702355c4519f457a71
|
4
|
+
data.tar.gz: 6b442dbb19c7925645c4b99ed3316891e8a9996f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 121d8f9a2fec2ea187f8986fbff9bf4b7098fae3af6331b5f35feb330bdc34f3324a83fad280125163c96c0bc4bc7365edeb2d5022a41098420f163edd0ad8c2
|
7
|
+
data.tar.gz: f187be053a500304f64140c4059c16eb60ff5d8aeb3ed6d9783acfd1015e46d3706572d30304dd9b58121d47eec3f17ed0e375f478660f1b4e3c992bba9f1de9
|
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.
|
17
|
-
s.date = '2016-
|
16
|
+
s.version = '0.48.0'
|
17
|
+
s.date = '2016-03-07'
|
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/connection.rb
CHANGED
@@ -140,9 +140,9 @@ module Excon
|
|
140
140
|
|
141
141
|
# add additional "\r\n" to indicate end of headers
|
142
142
|
request << CR_NL
|
143
|
-
socket.write(request) # write out request + headers
|
144
143
|
|
145
144
|
if datum.has_key?(:request_block)
|
145
|
+
socket.write(request) # write out request + headers
|
146
146
|
while true # write out body with chunked encoding
|
147
147
|
chunk = datum[:request_block].call
|
148
148
|
if FORCE_ENC
|
@@ -155,6 +155,8 @@ module Excon
|
|
155
155
|
break
|
156
156
|
end
|
157
157
|
end
|
158
|
+
elsif body.nil?
|
159
|
+
socket.write(request) # write out request + headers
|
158
160
|
elsif !body.nil? # write out body
|
159
161
|
if body.respond_to?(:binmode)
|
160
162
|
body.binmode
|
@@ -162,6 +164,21 @@ module Excon
|
|
162
164
|
if body.respond_to?(:rewind)
|
163
165
|
body.rewind rescue nil
|
164
166
|
end
|
167
|
+
|
168
|
+
# if request + headers is less than chunk size, fill with body
|
169
|
+
if FORCE_ENC
|
170
|
+
request.force_encoding('BINARY')
|
171
|
+
end
|
172
|
+
chunk = body.read([datum[:chunk_size] - request.length, 0].max)
|
173
|
+
if chunk
|
174
|
+
if FORCE_ENC
|
175
|
+
chunk.force_encoding('BINARY')
|
176
|
+
end
|
177
|
+
socket.write(request << chunk)
|
178
|
+
else
|
179
|
+
socket.write(request) # write out request + headers
|
180
|
+
end
|
181
|
+
|
165
182
|
while chunk = body.read(datum[:chunk_size])
|
166
183
|
socket.write(chunk)
|
167
184
|
end
|
data/lib/excon/constants.rb
CHANGED
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.
|
4
|
+
version: 0.48.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dpiddy (Dan Peterson)
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-03-07 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|