From f4f34e0faa39e20c5def836506ca308e29339e15 Mon Sep 17 00:00:00 2001 From: Maxwell Salzberg Date: Mon, 4 Jul 2011 12:20:02 -0700 Subject: [PATCH] fix for public posts in development mode, in single process mode, when your pod_url is still set to localhost --- lib/pubsubhubbub.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/pubsubhubbub.rb b/lib/pubsubhubbub.rb index b24b7f798..6de442a8e 100644 --- a/lib/pubsubhubbub.rb +++ b/lib/pubsubhubbub.rb @@ -12,7 +12,11 @@ class Pubsubhubbub end def publish(feed) - response = RestClient.post(@hub, :headers => @headers, 'hub.url' => feed, 'hub.mode' => 'publish') - response + begin + response = RestClient.post(@hub, :headers => @headers, 'hub.url' => feed, 'hub.mode' => 'publish') + return response + rescue RestClient::BadRequest=> e + Rails.logger.warn "Public URL for your users are incorrect. this is ok if you are in development and localhost is your pod_url#{e.inspect}" + end end end