From b0cdf1ec0568fac319dd4404bbaf37848abedab0 Mon Sep 17 00:00:00 2001
From: Robert May <robotmay@gmail.com>
Date: Wed, 11 Apr 2012 16:00:23 +0200
Subject: [PATCH] Adds sending request header support, useful for Nominatim at
the least.
---
lib/geocoder/lookups/base.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/geocoder/lookups/base.rb b/lib/geocoder/lookups/base.rb
index 62f91207..8e58c451 100644
--- a/lib/geocoder/lookups/base.rb
+++ b/lib/geocoder/lookups/base.rb
@@ -149,7 +149,7 @@ module Geocoder
unless cache and body = cache[url]
client = http_client.new(uri.host, uri.port)
client.use_ssl = true if Geocoder::Configuration.use_https
- response = client.get(uri.request_uri)
+ response = client.get(uri.request_uri, Geocoder::Configuration.request_headers)
body = response.body
if cache and (200..399).include?(response.code.to_i)
cache[url] = body
--
GitLab