lib/onebox/helpers.rb in onebox-2.2.12 vs lib/onebox/helpers.rb in onebox-2.2.13

- old
+ new

@@ -125,13 +125,13 @@ http.verify_mode = OpenSSL::SSL::VERIFY_NONE end http.request_head([uri.path, uri.query].join("?")) do |response| code = response.code.to_i - unless code === 200 || Onebox::Helpers.blank?(response.header['content-length']) + unless code === 200 || Onebox::Helpers.blank?(response.content_length) return nil end - return response.header['content-length'] + return response.content_length end end end def self.pretty_filesize(size)