Closed meh9 closed 9 years ago
This is the commit that introduced the service health check, removing it makes the layers load again:
https://github.com/NICTA/nationalmap/commit/0c5f60d760e5d06b655c2963ee4a662a6215d08e
I was trying to minimize the overhead of checking the server and a getCapabilities can be quite large and slow. I'll see what else can be done to minimize the overhead.
I see that you now allow status code 400 on the WMS health check, that's great, and solve many of my layer issues.
Unfortunately GA also has a badly behaved WMS that returns a 500 but if you ignore that it works fine:
Working GetCapabilities:
The simple fix (which I've done locally for now) is obviously to add a 500 case where the check for 400 is performed, but you might want to do something different:
https://github.com/NICTA/aremi-natmap/commit/36eca135dad201f178aa2047b43badab637b1b57
When you tick a WMS layer the first thing that appears to happen is that the National Map checks if the service is alive, by doing a GET request on the base URL of the service.
For example, when you turn on the Earthquake Hazard layer, a GET is made to the URL (without any parameters):
http://www.ga.gov.au/gis/services/hazards/EarthquakeHazard/MapServer/WMSServer
The tiles will only be loaded if National Map gets a 200 response.
However, even though the response code is 200, the actual response is this:
But National Map doesn't care, since it got 200 it then proceeds to load the tiles.
This becomes a problem when a WMS actually returns a proper response code for the error, like this one:
http://www.ga.gov.au/thredds/wms/national_grids/radmap10_unfiltered_pctk.nc
When you hit that URL you correctly get a 400 response, since it's not a valid WMS request. Unfortunately this means National Map now will not load the tiles.
If you hit the GetCapabilities URL below you will see that the WMS is actually alive and well:
http://www.ga.gov.au/thredds/wms/national_grids/radmap10_unfiltered_pctk.nc?service=WMS&version=1.3.0&request=GetCapabilities
Perhaps the National Map initial status check should be changed to a GetCapabilities request?