lib/shunt_cache/checker.rb in shunt_cache-0.0.2 vs lib/shunt_cache/checker.rb in shunt_cache-0.1.0
- old
+ new
@@ -27,10 +27,12 @@
timeout = options.fetch(:timeout, 10)
response = nil
Net::HTTP.start(uri.host, uri.port) do |http|
http.read_timeout = timeout
+
request = Net::HTTP::Get.new(uri.path)
+ request['Host'] = options[:host] if options[:host]
response = http.request(request)
end
response
end
\ No newline at end of file