File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -154,6 +154,7 @@ A full sample config file is shown below:
154154 # MS_OPENLAYERS_JS_URL "http://openlayers.org/api/OpenLayers.js"
155155 # MS_TEMPPATH "/tmp"
156156 # MS_MAX_OPEN_FILES 200 # maximum number of open files allowed on Windows
157+ # MS_WMS_ERROR_STATUS_CODE "ON" # enable HTTP status code 4xx and 5xx in case of errors on WMS requests
157158 END
158159
159160 #
Original file line number Diff line number Diff line change @@ -2165,6 +2165,37 @@ Vendor specific WMS parameters
21652165.. index::
21662166 pair: WMS; Cascading requests
21672167
2168+ HTTP status error codes
2169+ -----------------------
2170+
2171+ The OGC WMS specification is not explicit about which HTTP status error code
2172+ servers should return in case of errors. Traditionaly most WMS implementation
2173+ return "200 OK" in those situations. Starting with MapServer 8.4, it is
2174+ possible to define the ``MS_WMS_ERROR_STATUS_CODE`` configuration option to ``ON``
2175+ in the CONFIG.ENV section of the MapServer configuration file to ask MapServer
2176+ to return HTTP 4xx or 5xx status codes in case of error.
2177+
2178+
2179+ .. code-block:: mapfile
2180+
2181+
2182+ CONFIG
2183+ #
2184+ # Environment variables
2185+ #
2186+ ENV
2187+ #
2188+ # Limit Mapfile Access
2189+ #
2190+ # MS_MAP_NO_PATH "1"
2191+ MS_MAP_PATTERN "^/opt/mapserver" ## required when referencing mapfiles by path
2192+ # MS_MAP_BAD_PATTERN "[/\\]{2}|[/\\]?\\.+[/\\]|,"
2193+
2194+ # Enable HTTP status code 4xx and 5xx in case of errors on WMS requests
2195+ MS_WMS_ERROR_STATUS_CODE "ON"
2196+ END
2197+ END
2198+
21682199Cascading WMS Requests
21692200----------------------
21702201
You can’t perform that action at this time.
0 commit comments