summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-08-29 17:39:19 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-08-29 17:39:19 +0000
commitb6812ac0c2fc9c031955635fc2134aebd3c9b526 (patch)
treed50b1758925f6bba1abe46f361cb7ce290b344fd /lib
parent05dfd4e1a0f4e17c23ae7bfeed776c943c9394fe (diff)
HttpUtil: match /gzip/ regexp instead of exact (x-)gzip to survive nonconformat headers.
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/core/utils/httputil.rb2
1 files changed, 1 insertions, 1 deletions
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