glebtv-httpclient 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/httpclient/session.rb +4 -6
- data/lib/httpclient/version.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: 3f60ae5d8ff1599208d3444724647db9d54b8b05
|
4
|
+
data.tar.gz: d3cc6ddcd4da48b914b330f12f73e705928c9d6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4fb73b7d1bc0600169d1005c9cf25981db8221418fc8085c99ec34f29d371f2442002fa29d13abaff5ac170726d3a14ed4d2f88ec9310839bd9bcfe33335923
|
7
|
+
data.tar.gz: f7c0801250447ed0672efc01685698dcc5632ac024524ca4013684f083d1b780410cf190741e27f24654317214f3005a324eb09cce00c399a647f2fbf0b6c2ac
|
data/lib/httpclient/session.rb
CHANGED
@@ -696,10 +696,7 @@ class HTTPClient
|
|
696
696
|
original_block = block
|
697
697
|
if @chunked
|
698
698
|
buffer = ''
|
699
|
-
block = Proc.new { |buf|
|
700
|
-
# we need to strip last \r\n from string for proper gzip decompression
|
701
|
-
buffer += buf[0..-3]
|
702
|
-
}
|
699
|
+
block = Proc.new { |buf| buffer += buf }
|
703
700
|
else
|
704
701
|
block = Proc.new { |buf|
|
705
702
|
original_block.call(inflate_stream.inflate(buf))
|
@@ -708,7 +705,7 @@ class HTTPClient
|
|
708
705
|
end
|
709
706
|
if @chunked
|
710
707
|
read_body_chunked(&block)
|
711
|
-
if @gzipped
|
708
|
+
if @gzipped and @transparent_gzip_decompression
|
712
709
|
original_block.call(inflate_stream.inflate(buffer))
|
713
710
|
end
|
714
711
|
elsif @content_length
|
@@ -996,7 +993,8 @@ class HTTPClient
|
|
996
993
|
return
|
997
994
|
end
|
998
995
|
timeout(@receive_timeout, ReceiveTimeoutError) do
|
999
|
-
@socket.read(@chunk_length
|
996
|
+
@socket.read(@chunk_length, buf)
|
997
|
+
@socket.read(2) # CRLF
|
1000
998
|
end
|
1001
999
|
unless buf.empty?
|
1002
1000
|
yield buf.slice(0, @chunk_length)
|
data/lib/httpclient/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glebtv-httpclient
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- glebtv
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: glebtv@gmail.com
|