<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Steve,</p>
    <p>Excellent initiative. A few remarks:</p>
    <p>- Why not calling this a configuration file ? I believe it would
      be slightly clearer than context</p>
    <p>- Since MS 8.0 will include nlohmann/json, perhaps consider a
      JSON configuration file rather than our historical mapfile-like
      syntax ? This would allow to develop a json-schema for validation.
      Your example would become:<br>
    </p>
    <p>{<br>
    </p>
    <p>  "env": {</p>
    <p>    "#comment": "put some comment here"<br>
    </p>
    <p>    "<code>MS_MAP_NO_PATH": "true"<br>
      </code></p>
    <p>  },</p>
    <p>  "maps": {<br>
    </p>
    <p>   "<code>MAP1": "/opt/mapserver/myapp/map1.map",</code></p>
    <p><code>  "MAP2": "</code><code>/opt/mapserver/myapp/map2.map"</code></p>
    <p><code></code></p>
    <p>  }</p>
    <p>}</p>
    <p>- Regarding using putenv(), I'm not sure this is a good idea in
      FastCGI mode, according to what is mentioned in
      <a class="moz-txt-link-freetext" href="http://web.mit.edu/wwwdev/man/man3/FCGI_Accept.3">http://web.mit.edu/wwwdev/man/man3/FCGI_Accept.3</a>.  Using GDAL
      CPLSetConfigOption() instead of putenv() and CPLGetConfigOption()
      instead of getenv() would avoid messing with the "environ" global
      variable. (unless I'm wrong our CI doesn't test at all CGI /
      FastCGI ... I'll try to look at adding some testing of this)</p>
    <p>Even</p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">Le 02/04/2021 à 23:19, Steve Lime a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CAMrKZ9-OHBXg5hKYAR0nSNGqDbaNLDTikK1BbhQrE=1mKswVTA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hi all: Just thinking about ways to make
        configuring MapServer easier for information you can't or don't
        want to manage in mapfiles. Currently that is done via
        environment variables. Another option would be the use of
        config/ini-type file. I've started a draft RFC for something
        I'll call a MapServer context file for the moment. See <a
href="https://github.com/sdlime/mapserver/wiki/MapServer-8.0-Context-File"
          moz-do-not-send="true">https://github.com/sdlime/mapserver/wiki/MapServer-8.0-Context-File</a>
        for more information. Just floating an idea at this point...
        <div><br>
        </div>
        <div>--Steve</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
mapserver-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-dev@lists.osgeo.org">mapserver-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/mapserver-dev">https://lists.osgeo.org/mailman/listinfo/mapserver-dev</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>