diff options
author | Tom Gilbert <tom@linuxbrit.co.uk> | 2006-01-26 11:10:14 +0000 |
---|---|---|
committer | Tom Gilbert <tom@linuxbrit.co.uk> | 2006-01-26 11:10:14 +0000 |
commit | fd4f468dea8668e4ae612961dd1c703ade113f87 (patch) | |
tree | 184c3a866ec54027c0125ce7035d234b7e6a40cc | |
parent | 7881d147ffdd59fe67f1e48ebd13d645ea3a0292 (diff) |
TODO - work out why httputil with proxies doesn't like a head then a get on
the same object....
workaround for now..
-rw-r--r-- | data/rbot/plugins/url.rb | 3 |
1 files changed, 1 insertions, 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') |