From df0347a97390299b1d4ef878d3f592e01c477afc Mon Sep 17 00:00:00 2001 From: Chris Gahan Date: Thu, 9 Feb 2006 18:54:04 +0000 Subject: Little tweak to fix an edge-case. --- data/rbot/plugins/url.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'data') diff --git a/data/rbot/plugins/url.rb b/data/rbot/plugins/url.rb index 858b5a05..ca24f072 100644 --- a/data/rbot/plugins/url.rb +++ b/data/rbot/plugins/url.rb @@ -360,8 +360,8 @@ class UrlPlugin < Plugin case response when Net::HTTPRedirection then # call self recursively if this is a redirect - redirect_to = response['location'] - puts "+ redirect location: #{redirect_to}" + redirect_to = response['location'] || './' + puts "+ redirect location: #{redirect_to.inspect}" url = URI.join url.to_s, redirect_to puts "+ whee, redirecting to #{url.to_s}!" title = get_title_for_url(url.to_s, depth-1) -- cgit v1.2.3