Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve handling of key environment variables (as they do not work on Windows systems) #251

Open
jmckenna opened this issue Apr 18, 2021 · 1 comment

Comments

@jmckenna
Copy link
Member

jmckenna commented Apr 18, 2021

  • this is a long reported issue (many tickets in MapServer codebase over a decade or more) where environment variables do not work on all Windows systems (no matter what the web server is)
  • an example key environment variable, that is relied upon by the MapCache codebase is CURL_CA_BUNDLE
  • MapCache in /mapcache/lib/http.c faces this same problem on Windows systems (MS4W has had to do various workarounds because of this, for years, for both MapCache and MapServer)
  • pull request WIP: Use CPLSetConfigOption/CPLGetConfigOption for some CGI/FastCGI-related env vars. MapServer#6304 enables use of that variable through the mapfile CONFIG parameter
  • update: I wonder if we could have a new section in mapcache.xml named <environment_variables>, and these would take precedence (use this value, otherwise use the one found at the system level).

Thoughts?

@geographika
Copy link
Member

@jmckenna - where wre you able to pass the file path in CURL_CA_BUNDLE to cURL?
In MapServer we have the following line at https://github.com/MapServer/MapServer/blob/c862b04cf690091995df40139a6be77a2ff72bce/maphttp.c#L579

      unchecked_curl_easy_setopt(http_handle, CURLOPT_CAINFO, pszCurlCABundle );

The XML approach sounds good. Alternatively the CPLGetConfigOption approach used in MapServer could be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants