From b6812ac0c2fc9c031955635fc2134aebd3c9b526 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 29 Aug 2007 17:39:19 +0000 Subject: HttpUtil: match /gzip/ regexp instead of exact (x-)gzip to survive nonconformat headers. --- lib/rbot/core/utils/httputil.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rbot') diff --git a/lib/rbot/core/utils/httputil.rb b/lib/rbot/core/utils/httputil.rb index 43c4f6dd..2328dc26 100644 --- a/lib/rbot/core/utils/httputil.rb +++ b/lib/rbot/core/utils/httputil.rb @@ -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 -- cgit v1.2.3