Hi Steve, your pattern works like a charm... escaped hyphen was the issue. I tested the previous regex with regex101.com and it matches with no problems against most of the available variants except PCRE. Which regex engine is suitable for a test against MapServer?
Thank you. st 2. 6. 2021 v 15:16 odesílatel Steve Lime <sdl...@gmail.com> napsal: > Hi David: Presumably the Docker image is running the most recent version > of 7.4 which would have that pull request applied. That said, I don't think > it's the culprit here and I have seen some issues with -'s where the > MS_MAP_PATTERN expression compiles fine but doesn't match as expected. > Re-writing the expression to move the - character can help. Try this: > > > MS_MAP_PATTERN=^\/etc\/mapserver\/([^\.][-_A-Za-z0-9\.]+\/{1})*([-_A-Za-z0-9\.]+\.map)$ > > --Steve > > On Wed, Jun 2, 2021 at 3:07 AM David Pavlíček via mapserver-users < > mapserver-users@lists.osgeo.org> wrote: > >> Hello, >> I'm using camptocamp/mapserver:7.4 docker image to run mapserver on our >> servers and I have recently encountered this error: >> >> [warn] [pid 25] mod_fcgid: stderr: msCGILoadMap(): Web application error. >> CGI variable "map" fails to validate. >> 2098 - 172.17.0.1 - - [02/Jun/2021:04:57:42 +0000] "GET >> /?map=/etc/mapserver/puobod/krpk-puobod-red.map&request=getcapabilities&service=WMS" >> >> In fact, any mapfile with hyphens won't work. They fail against >> MS_MAP_PATTERN regex or something. This is strange because I tested this >> regex and it works fine. Container MS ENV variables look like this: >> >> MS_ERRORFILE=stderr >> >> MS_MAP_PATTERN=^\/etc\/mapserver\/([^\.][_A-Za-z0-9\-\.]+\/{1})*([_A-Za-z0-9\-\.]+\.map)$ >> MS_DEBUGLEVEL=0 >> MS_MAPFILE=/etc/mapserver/mapserver.map >> >> Maybe something related to this PR: >> https://github.com/MapServer/MapServer/pull/6314 >> >> Any suggestions about that? Renaming project is not an option because >> they are referenced in many places outside of our direct reach (GIS >> clients, servers, etc) >> >> Thanks, David >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users@lists.osgeo.org >> https://lists.osgeo.org/mailman/listinfo/mapserver-users >> >
_______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users