lib/bulletware.rb in bullet-1.6.0 vs lib/bulletware.rb in bullet-1.7.0
- old
+ new
@@ -29,10 +29,10 @@
def empty?(response)
(response.is_a?(Array) && response.empty?) || !response.body.is_a?(String) || response.body.empty?
end
def check_html?(headers, response)
- !headers['Content-Type'].nil? and headers['Content-Type'].include? 'text/html' and response.body =~ %r{<html.*</html>}m
+ headers['Content-Type'] and headers['Content-Type'].include? 'text/html' and response.body =~ %r{<html.*</html>}m
end
def no_browser_cache(headers)
headers["Cache-Control"] = "no-cache, no-store, max-age=0, must-revalidate"
headers["Pragma"] = "no-cache"