Fixes #458 - Follow the location when hashing a page

This commit is contained in:
erwanlr
2014-04-16 15:55:34 +02:00
parent 45f5f50262
commit 447589541f

View File

@@ -71,7 +71,7 @@ class WebSite
#
# @return [ String ] The MD5 hash of the page
def self.page_hash(page)
page = Browser.get(page) unless page.is_a?(Typhoeus::Response)
page = Browser.get(page, { followlocation: true, cache_ttl: 0 }) unless page.is_a?(Typhoeus::Response)
Digest::MD5.hexdigest(page.body.gsub(/<!--.*?-->/m, ''))
end