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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e9b33e3d213df1ab2e7b7f7f45a41b25d628efc3
4
- data.tar.gz: 4a4b694449ca0f15f398007c6a9256a04e74a565
3
+ metadata.gz: 3f60ae5d8ff1599208d3444724647db9d54b8b05
4
+ data.tar.gz: d3cc6ddcd4da48b914b330f12f73e705928c9d6e
5
5
  SHA512:
6
- metadata.gz: 45da6038263683200cd2d08a1f2d1f55f3d92e3142152bf0aedee4a63aafa8ea269313812ec3ae400f5415108d264fe95fbb314a14382bf5b88dce6fc591490c
7
- data.tar.gz: a1c0f261ecf19047bae79fe2c51062164542388eb6cc301f35758e2ae37eaaae514da421569c38c12769e802bea2a9c536ad7537c07c544f2245638de66515dc
6
+ metadata.gz: c4fb73b7d1bc0600169d1005c9cf25981db8221418fc8085c99ec34f29d371f2442002fa29d13abaff5ac170726d3a14ed4d2f88ec9310839bd9bcfe33335923
7
+ data.tar.gz: f7c0801250447ed0672efc01685698dcc5632ac024524ca4013684f083d1b780410cf190741e27f24654317214f3005a324eb09cce00c399a647f2fbf0b6c2ac
@@ -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 + 2, buf)
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)
@@ -1,3 +1,3 @@
1
1
  class HTTPClient
2
- VERSION = '2.3.3'
2
+ VERSION = '3.0.1'
3
3
  end
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.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-13 00:00:00.000000000 Z
11
+ date: 2013-05-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: glebtv@gmail.com