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

WIP: Use CPLSetConfigOption/CPLGetConfigOption for some CGI/FastCGI-related env vars. #6304

Merged
merged 2 commits into from Apr 23, 2021

Conversation

sdlime
Copy link
Member

@sdlime sdlime commented Apr 18, 2021

Potential solution for IIS/FastCGI where we push some high-value environment variables into the CPL environment (using CPLSetConfigOption) and then reference them there (CPLGetConfigOption). This is against branch-7-6 rather than main since the config file work would replace this.

Should be ok for non-IIS/FastCGI as well.

--Steve

… instead of the env (mostly for IIS/FastCGI).
maphttp.c Outdated Show resolved Hide resolved
mapserv.c Outdated Show resolved Hide resolved
mapserv.h Outdated Show resolved Hide resolved
@jmckenna
Copy link
Member

jmckenna commented Apr 18, 2021

This will be a great help Steve, as MS4W has had to do workarounds for this issue for several years, so that users never had to deal with this problem (also affects MapCache at /mapcache/lib/http.c ...will file that ticket now for MapCache). PS> this issue is not just for IIS.

@sdlime sdlime changed the title WIP: Use CPLSetConfigOption/CPLGetConfigOption for some CGI/CastCGI-related env vars. WIP: Use CPLSetConfigOption/CPLGetConfigOption for some CGI/FastCGI-related env vars. Apr 19, 2021
@sdlime
Copy link
Member Author

sdlime commented Apr 19, 2021

Will wait on merging until folks actually confirm it helps in various environments - mostly Windows CGI and FastCGI.

@geographika
Copy link
Member

@sdlime - many thanks for this! I've built and tested on a fresh Windows 10/ IIS 10 install. All environ variables are now read correctly, with cascading WMS over HTTP now possible thanks to being able to use the CURL_CA_BUNDLE variable.

I've updated the IIS docs in preparation for this being merged: MapServer/MapServer-documentation#517

@sdlime
Copy link
Member Author

sdlime commented Apr 22, 2021

Should I redo this against main? Seems like it and then we'd backport to wherever. I've not done a rebase before though...

@geographika
Copy link
Member

Should I redo this against main? Seems like it and then we'd backport to wherever. I've not done a rebase before though...

@sdlime - I cherry-picked these onto main in #6305 if that helps?

@rouault rouault merged commit b128dac into MapServer:branch-7-6 Apr 23, 2021
2 of 3 checks passed
@sdlime sdlime deleted the iis_env branch April 25, 2021 14:53
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

Successfully merging this pull request may close these issues.

None yet

4 participants