From 5a1e2b5d174ba11073ff122530b29488185366c0 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sun, 15 Apr 2007 01:44:40 +0000 Subject: HttpUtil: fix gunzipping with partial content; and debug response in url plugin earlier --- data/rbot/plugins/url.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'data/rbot/plugins') diff --git a/data/rbot/plugins/url.rb b/data/rbot/plugins/url.rb index 8a05cafa..10cc419a 100644 --- a/data/rbot/plugins/url.rb +++ b/data/rbot/plugins/url.rb @@ -52,6 +52,8 @@ class UrlPlugin < Plugin case resp when Net::HTTPSuccess + debug resp.to_hash + if resp['content-type'] =~ /^text\/|(?:x|ht)ml/ # The page is text or HTML, so we can try finding a title and, if # requested, the first par. @@ -76,8 +78,6 @@ class UrlPlugin < Plugin # if nothing was found, provide more basic info, as for non-html pages end - debug resp.to_hash.inspect - enc = resp['content-encoding'] extra << ", #{Bold}encoding#{Bold}: #{enc}" if enc -- cgit v1.2.3