[openstreetmap/openstreetmap-website] Set a custom user agent when making http requests (PR #4957)
Tom Hughes
notifications at github.com
Tue Jul 9 17:19:51 UTC 2024
@tomhughes commented on this pull request.
> @@ -11,14 +11,16 @@ def self.describe_location(lat, lon, zoom = nil, language = nil)
url = "#{Settings.nominatim_url}reverse?lat=#{lat}&lon=#{lon}&zoom=#{zoom}&accept-language=#{language}"
begin
- response = Timeout.timeout(4) do
- REXML::Document.new(Net::HTTP.get(URI.parse(url)))
+ response = OSM.http_client.get(URI.parse(url)) do |request|
+ request.timeout = 4
Thanks for the catch - now fixed.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4957#discussion_r1670908192
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4957/review/2166951121 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240709/31c7e916/attachment.htm>
More information about the rails-dev
mailing list