[#66126] Creation/Conversion methods/functions table for Ruby types — SASADA Koichi <ko1@...>
Hi,
5 messages
2014/11/07
[#66248] [ruby-trunk - Feature #10423] [PATCH] opt_str_lit*: avoid literal string allocations — normalperson@...
Issue #10423 has been updated by Eric Wong.
3 messages
2014/11/13
[#66595] [ruby-trunk - Bug #10557] [Open] Block not given when the argument is a string — bartosz@...
Issue #10557 has been reported by Bartosz Kopinski.
3 messages
2014/11/30
[ruby-core:66125] [ruby-trunk - Bug #10484] [Open] http response throw error with broken gzip compressed block(but can decompress)
From:
charsyam@...
Date:
2014-11-07 08:13:50 UTC
List:
ruby-core #66125
Issue #10484 has been reported by DaeMyung Kang. ---------------------------------------- Bug #10484: http response throw error with broken gzip compressed block(but can decompress) https://bugs.ruby-lang.org/issues/10484 * Author: DaeMyung Kang * Status: Open * Priority: Low * Assignee: * Category: * Target version: * ruby -v: 2.1.4 * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN ---------------------------------------- I meet a exception case for gzip compress, Ruby throws Zlib::BufError Actually, I think this is not ruby's bug. because this site make some weird gzip compressed block. but major browser can handle this site well. so, I this it is better to handle this case in Ruby also. http://xe.sketchbooks.co.kr/806541 I found two things but it is because of weird compress block. first, even though, it meets end of block, it just return Z_OK. so, ruby zlib binding can't return last data block. so I add code for returning last block in this case. second. finish causes Zlib::BufError exception in this case. so I catch this Exception only when finish causes Zlib::BufError and I found one more thing. Ruby 1.8.x run below code well. But ruby 2.x can't (I just guess, it is unintented side effect to push block code for inflate) ```ruby require 'net/https' require 'open-uri' url = "http://xe.sketchbooks.co.kr/806541" uri = URI.parse(url.to_s) http = Net::HTTP::new(uri.host, uri.port) http_get = Net::HTTP::Get.new(uri.request_uri) response = http.request(http_get) ``` ---Files-------------------------------- ruby_weird_gzip.patch (1.27 KB) -- https://bugs.ruby-lang.org/