lib/feedzirra/feed.rb in kete-feedzirra-0.0.16.1 vs lib/feedzirra/feed.rb in kete-feedzirra-0.0.18.1
- old
+ new
@@ -94,11 +94,11 @@
curl.timeout = options[:timeout] if options[:timeout]
curl.on_success do |c|
responses[url] = decode_content(c)
end
- curl.on_failure do |c|
+ curl.on_failure do |c, err|
responses[url] = c.response_code
end
end
multi.add(easy)
end
@@ -233,11 +233,11 @@
# raise NoParserAvailable.new("no valid parser for content.") (this would unfirtunately fail the whole 'multi', so it's not really useable)
options[:on_failure].call(url, c.response_code, c.header_str, c.body_str) if options.has_key?(:on_failure)
end
end
- curl.on_failure do |c|
+ curl.on_failure do |c, err|
add_url_to_multi(multi, url_queue.shift, url_queue, responses, options) unless url_queue.empty?
responses[url] = c.response_code
options[:on_failure].call(url, c.response_code, c.header_str, c.body_str) if options.has_key?(:on_failure)
end
end
@@ -282,10 +282,10 @@
rescue Exception => e
options[:on_failure].call(feed, c.response_code, c.header_str, c.body_str) if options.has_key?(:on_failure)
end
end
- curl.on_failure do |c|
+ curl.on_failure do |c, err|
add_feed_to_multi(multi, feed_queue.shift, feed_queue, responses, options) unless feed_queue.empty?
response_code = c.response_code
if response_code == 304 # it's not modified. this isn't an error condition
responses[feed.feed_url] = feed
options[:on_success].call(feed) if options.has_key?(:on_success)
\ No newline at end of file