Skip to content

Process empty path requests with mapfiles in querystrings#7366

Merged
jmckenna merged 4 commits into
MapServer:mainfrom
geographika:path-info-fix
Oct 19, 2025
Merged

Process empty path requests with mapfiles in querystrings#7366
jmckenna merged 4 commits into
MapServer:mainfrom
geographika:path-info-fix

Conversation

@geographika
Copy link
Copy Markdown
Member

While testing the latest main branch in a few different environments, I noticed requests using the new MS_INDEX_TEMPLATE_DIRECTORY would return the index page for requests with PATH_INFO set to / but with a valid querystring containing a map e.g. http://localhost:7000/?map=/etc/mapserver/lines.map&REQUEST=GetMap....

This PR should ensure the index page is only returned when no map is loaded, or no parameters are passed to MapServer.

@jmckenna jmckenna added this to the 8.6.0 Release milestone Oct 18, 2025
@jmckenna
Copy link
Copy Markdown
Member

thanks @geographika. Can you possibly include an msautotest for this? (I imagine there should be a way to call this through localhost and check the response with curl etc). thanks again.

@geographika
Copy link
Copy Markdown
Member Author

@jmckenna - tests added. It was possible to recreate using msautotests.

@jmckenna
Copy link
Copy Markdown
Member

thanks @geographika !

@jmckenna jmckenna merged commit e71de03 into MapServer:main Oct 19, 2025
17 checks passed
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.

2 participants