From 9556f99333f92696b7549b897e5992310dc5577e Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sun, 25 Mar 2007 20:08:56 +0000 Subject: HttpUtil: fix partial_body when no body was given, and increase default info_bytes to 8k --- lib/rbot/core/utils/httputil.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/rbot') diff --git a/lib/rbot/core/utils/httputil.rb b/lib/rbot/core/utils/httputil.rb index 904e1941..aebd1e81 100644 --- a/lib/rbot/core/utils/httputil.rb +++ b/lib/rbot/core/utils/httputil.rb @@ -29,7 +29,7 @@ module ::Net self.read_body { |chunk| partial << chunk - yield partial + yield partial if block_given? break if size and size > 0 and partial.length >= size } @@ -76,7 +76,7 @@ class HttpUtil :default => false, :desc => "Set this to true if you want the bot to never expire the cached pages") BotConfig.register BotConfigIntegerValue.new('http.info_bytes', - :default => 4096, + :default => 8192, :desc => "How many bytes to download from a web page to find some information. Set to 0 to let the bot download the whole page.") def initialize(bot) -- cgit v1.2.3