From be5f0607edafd1f8ab5b4f7f4a63569ea662c7ac Mon Sep 17 00:00:00 2001 From: sethg Date: Fri, 13 Feb 2026 19:01:50 +0100 Subject: [PATCH] Update RFC with implementation details and voting --- en/development/rfc/ms-rfc-141.txt | 64 ++++++++++++++++++++++++++++--- 1 file changed, 58 insertions(+), 6 deletions(-) diff --git a/en/development/rfc/ms-rfc-141.txt b/en/development/rfc/ms-rfc-141.txt index ecedb23bdf..27d38c4fbc 100644 --- a/en/development/rfc/ms-rfc-141.txt +++ b/en/development/rfc/ms-rfc-141.txt @@ -6,7 +6,7 @@ MS RFC 141: MapServer CONFIG MS_ONLINERESOURCE :Author: Seth Girvin :Contact: sethg@geographika.co.uk -:Last Updated: 2026-02-06 +:Last Updated: 2026-02-13 :Version: MapServer 8.8 :Status: Proposed @@ -114,12 +114,44 @@ Users will be able to add the new environment variable to the ``CONFIG`` file as CONFIG ENV - MS_ONLINERESOURCE "http://localhost/test/" + MS_ONLINERESOURCE "https://maps.example.com/" + END + MAPS + EXAMPLE "/data/mapfiles/example.map" + END + END + +When accessing the Mapfile using its key (``EXAMPLE`` in the above example), a request +such as https://maps.example.com/example/?service=wms&version=1.3.0&request=GetCapabilities will return a +GetCapabilities response with the base URL set to ``https://maps.example.com/``. + +.. code-block:: xml + + + + WMS + Example + + +When accessing a Mapfile using the ``&map=`` parameter, this will be appended to the ``MS_ONLINERESOURCE`` URL. +For example, a request to https://maps.example.com/?map=/data/mapfiles/example.map&service=wms&version=1.3.0&request=GetCapabilities +will return a GetCapabilities response including the following: + +.. code-block:: xml + + + + + + +For OGC API URLs requests such as https://maps.example.com/example/ogcapi/?f=json will return URLs in +the format https://maps.example.com/example/ogcapi/collections?f=html. Notes: -- Existing ``*_onlineresource`` metadata in a Mapfile will take precedence over - the ``CONFIG`` setting. +- In any of the above examples, if the ``example.map`` contained ``ows_onlineresource`` + (or a more specific variant such as ``wms_onlineresource`` or ``oga_onlineresource``) + then these would take precedence over the ``CONFIG`` setting and be used instead. - If ``MS_ONLINERESOURCE`` is set to an empty string, the resulting base URL will be empty. Users are responsible for providing a valid URL for their @@ -130,6 +162,21 @@ Notes: multiple variables such as ``MS_WMS_ONLINERESOURCE`` or ``MS_WFS_ONLINERESOURCE`` would add unnecessary complexity. +- ``?`` will be appended to the end of the URL for building OWS URLs, to ensure that query parameters are appended correctly. + +- MAP keys are resolved relative to MS_ONLINERESOURCE, and only one root URL can be configured per CGI instance. + For example, you cannot simultaneously use: + + + https://maps.example.com/dev/example/ + + https://maps.example.com/prod/example/ + + or separate hostnames such as: + + + https://wms.example.com + + https://wfs.example.com + + To support these scenarios, you would need to deploy separate MapServer CGI applications with different CONFIG files. + Testing ------- @@ -138,6 +185,7 @@ and Mapfile setups, including: - Cases with and without a ``MS_ONLINERESOURCE`` setting - The case where ``MS_ONLINERESOURCE`` is set to an empty string +- Use of ``map=`` parameter in requests Security Concerns ----------------- @@ -169,12 +217,16 @@ Affected files Ticket Reference ---------------- -TODO ++ https://github.com/MapServer/MapServer/pull/7434 Documentation ------------- +TODO + Voting History -------------- -TODO \ No newline at end of file ++1 from PSC members TomK, SethG, MikeS, DanielM, JeromeB, SteveL, EvenR, JeffM, JukkaR + +See https://lists.osgeo.org/pipermail/mapserver-dev/2026-February/017342.html for discussion and voting.