From fd4f468dea8668e4ae612961dd1c703ade113f87 Mon Sep 17 00:00:00 2001 From: Tom Gilbert Date: Thu, 26 Jan 2006 11:10:14 +0000 Subject: TODO - work out why httputil with proxies doesn't like a head then a get on the same object.... workaround for now.. --- data/rbot/plugins/url.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/data/rbot/plugins/url.rb b/data/rbot/plugins/url.rb index 57b43a61..782bc9f3 100644 --- a/data/rbot/plugins/url.rb +++ b/data/rbot/plugins/url.rb @@ -60,8 +60,7 @@ class UrlPlugin < Plugin # content is 'text/*' # retrieve the title from the page puts "+ getting #{url.path}" - response = http.request_get(url.path) - return get_title_from_html(response.body) + return get_title_from_html(@bot.httputil.get(url)) else # content isn't 'text/*'... display info about the file. size = head['content-length'].gsub(/(\d)(?=\d{3}+(?:\.|$))(\d{3}\..*)?/,'\1,\2') -- cgit v1.2.3