Project

General

Profile

Actions

Bug #11542

closed

Zlib::DataError: incorrect data check

Added by lingaraj (Lingaraj Kothokatta) over 8 years ago. Updated over 4 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.0p0 (2014-12-25 revision 49005) [i386-linux]
[ruby-core:<unknown>]

Description

When I trying to send HTTP POST, I am getting follolwing Error

Zlib::DataError: incorrect data check
/usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http/response.rb:377:in inflate' /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http/response.rb:377:in block in inflate_adapter'
/usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/protocol.rb:411:in call_block' /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/protocol.rb:402:in <<'
/usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/protocol.rb:106:in read' /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http/response.rb:399:in read'
/usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http/response.rb:289:in block in read_body_0' /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http/response.rb:260:in inflater'
/usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http/response.rb:279:in read_body_0' /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http/response.rb:201:in read_body'
/usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1398:in block in send_entity' /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1420:in block (2 levels) in transport_request'
/usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http/response.rb:162:in reading_body' /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1419:in block in transport_request'
/usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1410:in catch' /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1410:in transport_request'
/usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1383:in request' /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1376:in block in request'
/usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:853:in start' /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1374:in request'
/usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1397:in send_entity' /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1186:in post'


Files

screenshot.png (37.1 KB) screenshot.png peterept (Peter Koch), 02/16/2016 12:34 AM
Actions #1

Updated by lingaraj (Lingaraj Kothokatta) over 8 years ago

  • ruby -v set to ruby 2.2.0p0 (2014-12-25 revision 49005) [i386-linux]

Updated by nagachika (Tomoyuki Chikanaga) over 8 years ago

  • Status changed from Open to Feedback

Hello, Lingaraj.

It seems that the response contains invalid byte-stream or the content encoding was wrongly detected or so.
For more investigation, please show us the sample code to reproduce this error.

Updated by peterept (Peter Koch) about 8 years ago

Tomoyuki Chikanaga wrote:

Hello, Lingaraj.

It seems that the response contains invalid byte-stream or the content encoding was wrongly detected or so.
For more investigation, please show us the sample code to reproduce this error.

I get this error too - for me it is loading PNG screenshots from Android device (OS 4.4.4):

Zlib::DataError: incorrect data check
from /Users/EE/.rvm/gems/ruby-2.1.5/gems/chunky_png-1.3.5/lib/chunky_png/chunk.rb:249:in <<' from /Users/EE/.rvm/gems/ruby-2.1.5/gems/chunky_png-1.3.5/lib/chunky_png/chunk.rb:249:in block in combine_chunks'
from /Users/EE/.rvm/gems/ruby-2.1.5/gems/chunky_png-1.3.5/lib/chunky_png/chunk.rb:249:in each' from /Users/EE/.rvm/gems/ruby-2.1.5/gems/chunky_png-1.3.5/lib/chunky_png/chunk.rb:249:in combine_chunks'
from /Users/EE/.rvm/gems/ruby-2.1.5/gems/chunky_png-1.3.5/lib/chunky_png/datastream.rb:148:in imagedata' from /Users/EE/.rvm/gems/ruby-2.1.5/gems/chunky_png-1.3.5/lib/chunky_png/canvas/png_decoding.rb:88:in from_datastream'
from /Users/EE/.rvm/gems/ruby-2.1.5/gems/chunky_png-1.3.5/lib/chunky_png/image.rb:74:in from_datastream' from /Users/EE/.rvm/gems/ruby-2.1.5/gems/chunky_png-1.3.5/lib/chunky_png/canvas/png_decoding.rb:53:in from_file'
from (irb):2
from /Users/EE/.rvm/rubies/ruby-2.1.5/bin/irb:11:in `'

Imagemagick reports that there is extra fields:

$ convert screenshot.png NULL:
convert: Extra compressed data screenshot.png' à warning/png.c/MagickPNGWarningHandler/1777. convert: Extra compression data screenshot.png' à warning/png.c/MagickPNGWarningHandler/1777.

Is it that ZLib can't handle this?

I have attached a screenshot that fails.

The repro happens with this code:

require 'chunky_png'
image = ChunkyPNG::Image.from_file("screenshot.png")

Actions #4

Updated by jeremyevans0 (Jeremy Evans) over 4 years ago

  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0