]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
HttpUtil: match /gzip/ regexp instead of exact (x-)gzip to survive nonconformat headers.
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 29 Aug 2007 17:39:19 +0000 (17:39 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 29 Aug 2007 17:39:19 +0000 (17:39 +0000)
lib/rbot/core/utils/httputil.rb

index 43c4f6ddc710113930a1631add589237d7fad08d..2328dc26d5b0eaf20a31a3601588297e84b39a2c 100644 (file)
@@ -84,7 +84,7 @@ module ::Net
       case method
       when nil
         return str
-      when 'gzip', 'x-gzip'
+      when /gzip/ # Matches gzip, x-gzip, and the non-rfc-compliant gzip;q=\d sent by some servers
         debug "gunzipping body"
         begin
           return Zlib::GzipReader.new(StringIO.new(str)).read