From 08292978798b932d6530cad50ab67ee7d015f313 Mon Sep 17 00:00:00 2001
From: Guillaume Pasero <guillaume.pasero@c-s.fr>
Date: Fri, 20 Apr 2012 08:58:46 +0200
Subject: [PATCH] BUG: update CurlHelperStub to new GeoName URL

---
 Code/Testing/otbCurlHelperStub.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Code/Testing/otbCurlHelperStub.cxx b/Code/Testing/otbCurlHelperStub.cxx
index fcdf0843ce..802f94a298 100644
--- a/Code/Testing/otbCurlHelperStub.cxx
+++ b/Code/Testing/otbCurlHelperStub.cxx
@@ -33,7 +33,7 @@ bool CurlHelperStub::TestUrlAvailability(const std::string& url) const
 
 int CurlHelperStub::RetrieveUrlInMemory(const std::string& url, std::string& output) const
 {
-  if (url.compare("http://ws.geonames.org/findNearbyPlaceName?lat=1.29&lng=103.78") == 0)
+  if (url.compare("http://api.geonames.org/findNearbyPlaceName?lat=1.29&lng=103.78&username=otbteam") == 0)
     {
     output = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n"
         "<geonames>\n"
@@ -58,7 +58,7 @@ int CurlHelperStub::RetrieveUrlInMemory(const std::string& url, std::string& out
 
 int CurlHelperStub::RetrieveFile(const std::ostringstream& urlStream, std::string filename) const
 {
-  if (urlStream.str().compare("http://ws.geonames.org/findNearbyPlaceName?lat=1.29&lng=103.78") == 0)
+  if (urlStream.str().compare("http://api.geonames.org/findNearbyPlaceName?lat=1.29&lng=103.78&username=otbteam") == 0)
     {
     std::ofstream file;
     file.open(filename.c_str());
-- 
GitLab