Merge pull request #2282 from cschwarz/patch-1

Use https to access nominatim (fixes #2281)
This commit is contained in:
John Firebaugh
2014-07-10 09:42:55 -07:00
2 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
iD.countryCode = function() {
var countryCode = {},
endpoint = 'http://nominatim.openstreetmap.org/reverse?';
endpoint = 'https://nominatim.openstreetmap.org/reverse?';
if (!iD.countryCode.cache) {
iD.countryCode.cache = rbush();
+6 -6
View File
@@ -20,7 +20,7 @@ describe("iD.countryCode", function() {
var callback = sinon.spy();
countryCode.search([16, 48], callback);
server.respondWith("GET", "http://nominatim.openstreetmap.org/reverse?addressdetails=1&format=json&lat=48&lon=16",
server.respondWith("GET", "https://nominatim.openstreetmap.org/reverse?addressdetails=1&format=json&lat=48&lon=16",
[200, { "Content-Type": "application/json" },
'{"address":{"country_code":"at"}}']);
server.respond();
@@ -33,7 +33,7 @@ describe("iD.countryCode", function() {
var callback = sinon.spy();
countryCode.search([16, 48], callback);
server.respondWith("GET", "http://nominatim.openstreetmap.org/reverse?addressdetails=1&format=json&lat=48&lon=16",
server.respondWith("GET", "https://nominatim.openstreetmap.org/reverse?addressdetails=1&format=json&lat=48&lon=16",
[200, { "Content-Type": "application/json" },
'{"address":{"country_code":"at"}}']);
server.respond();
@@ -47,7 +47,7 @@ describe("iD.countryCode", function() {
countryCode.search([17, 49], callback);
server.respondWith("GET", "http://nominatim.openstreetmap.org/reverse?addressdetails=1&format=json&lat=49&lon=17",
server.respondWith("GET", "https://nominatim.openstreetmap.org/reverse?addressdetails=1&format=json&lat=49&lon=17",
[200, { "Content-Type": "application/json" },
'{"address":{"country_code":"cz"}}']);
server.respond();
@@ -60,7 +60,7 @@ describe("iD.countryCode", function() {
var callback = sinon.spy();
countryCode.search([16, 48], callback);
server.respondWith("GET", "http://nominatim.openstreetmap.org/reverse?addressdetails=1&format=json&lat=48&lon=16",
server.respondWith("GET", "https://nominatim.openstreetmap.org/reverse?addressdetails=1&format=json&lat=48&lon=16",
[200, { "Content-Type": "application/json" },
'{"address":{"country_code":"at"}}']);
server.respond();
@@ -74,7 +74,7 @@ describe("iD.countryCode", function() {
countryCode.search([16.01, 48.01], callback);
server.respondWith("GET", "http://nominatim.openstreetmap.org/reverse?addressdetails=1&format=json&lat=48.01&lon=16.01",
server.respondWith("GET", "https://nominatim.openstreetmap.org/reverse?addressdetails=1&format=json&lat=48.01&lon=16.01",
[200, { "Content-Type": "application/json" },
'{"address":{"country_code":"cz"}}']);
server.respond();
@@ -85,7 +85,7 @@ describe("iD.countryCode", function() {
var callback = sinon.spy();
countryCode.search([1000, 1000], callback);
server.respondWith("GET", "http://nominatim.openstreetmap.org/reverse?addressdetails=1&format=json&lat=1000&lon=1000",
server.respondWith("GET", "https://nominatim.openstreetmap.org/reverse?addressdetails=1&format=json&lat=1000&lon=1000",
[200, { "Content-Type": "application/json" },
'{"error":"Unable to geocode"}']);
server.respond();