lib/feedzirra/feed.rb in maxlapshin-feedzirra-0.0.16.3 vs lib/feedzirra/feed.rb in maxlapshin-feedzirra-0.0.16.4
- old
+ new
@@ -143,11 +143,11 @@
if klass
# begin
feed = klass.parse(xml)
feed.feed_url = http.respond_to?(:last_effective_url) : http.last_effective_url : http.uri.to_s
- feed.etag = http.response_header.etag
- feed.last_modified = http.response_header.last_modified
+ feed.etag = http.response_header.etag if http.response_header.respond_to?(:etag)
+ feed.last_modified = http.response_header.last_modified if http.response_header.respond_to?(:last_modified)
options[:on_success].call(url, feed) if options.has_key?(:on_success)
# rescue Exception => e
# options[:on_failure].call(url, http) if options.has_key?(:on_failure)
# end
else