Re: [mapserver-users] [mapserver-dev] Is there a way to use REMOTE_USER environment variable in RunTime Substitution?
Since you store the username in the cookie you are probably not concerned about security. In this case it might be sufficient to append the username by rewriting the query string: RewriteRule ^/my/map /my/map?user=%{REMOTE_USER} [QSA,PT] The loadParams() in cgiutil.c only works on the QUERY_STRING and COOKIE. If you like you can insert at line 267: if ((s = getenv2(REMOTE_USER, thread_context)) != NULL) { if(m = maxParams) { maxParams *= 2; request-ParamNames = (char **) msSmallRealloc(request-ParamNames,sizeof(char *) * maxParams); request-ParamValues = (char **) msSmallRealloc(request-ParamValues,sizeof(char *) * maxParams); } request-ParamNames[m] = msStrdup(remote_user); request-ParamValues[m] = msStrdup(s); m++; } I haven't tested this but since it's pretty straight forward it should work. But that's not very generic. Probably the MAP.WEB.METADATA could be used to define a import_env_vars-key with a list of names to be imported from the environment... HTH -Ursprüngliche Nachricht- Von: mapserver-dev-boun...@lists.osgeo.org [mailto:mapserver-dev- boun...@lists.osgeo.org] Im Auftrag von Smith, Michael ERDC-RDE-CRREL-NH Gesendet: Samstag, 20. Dezember 2014 14:25 An: mapserver-users@lists.osgeo.org Cc: mapserver-...@lists.osgeo.org Betreff: [mapserver-dev] Is there a way to use REMOTE_USER environment variable in RunTime Substitution? I'm using apache basic auth to filter results. I have been able to use mod_rewrite to create a cookie with the authenticated username and use that in runtime subst but it would be much simpler and cleaner to just do it reading the environment variable. So far, I haven't found a way to do this in current master. Any ideas? -- Michael Smith US Army Corps Remote Sensing GIS/Center ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver as WFS 1.1.0 client
Looking at the mapwfslayer.c code it's a little confusing. I see references to 0.0.14 and 1.0.0 for POST requests and 0.0.14, 1.0.0 and 1.1 for GET requests. You can try setting: wfs_request_method GET In the layer metadata and see if that works for you. Steve -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Lars Fricke Sent: Monday, December 22, 2014 12:58 AM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Mapserver as WFS 1.1.0 client Hello List, can you please give me a quick feedback on which version WFS MapServer supports as CLIENT (see below)? I can't really find it in the docs. Thank you. Lars Fricke Am 18.12.2014 um 08:29 schrieb Lars Fricke: Hello, I am trying to access an external WFS with MapServer as client to cascade it. I get the following error message: msBuildWFSLayerPostRequest(): WFS connection error. MapServer supports only WFS 1.0.0 or 0.0.14 (please verify the version metadata wfs_version). Indeed the external server only sends version 1.1.0 and my mapfile has: ... METADATA wfs_version1.1.0 ... Now when I search on the net, I find bug reports about WMS 1.1.0 and MapServer but no information if I can use it as a 1.1.0 client at all. And if so, do I need to use something specific to activate it? I'm on a German Ubuntu 14.04 64bit with Apache2 and mapserv -v says: MapServer version 6.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=GD SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Thanks for looking into this. Best Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver as WFS 1.1.0 client
As the error message says, MapServer doesn't support WFS 1.1.0 in CLIENT mode. I see that someone added some code in mapwfslayer.c to support WFS 1.1 axis order handling, but the rest of the code has not been upgraded to 1.1 so that code is of little/no use. Daniel On 14-12-22 1:58 AM, Lars Fricke wrote: Hello List, can you please give me a quick feedback on which version WFS MapServer supports as CLIENT (see below)? I can't really find it in the docs. Thank you. Lars Fricke Am 18.12.2014 um 08:29 schrieb Lars Fricke: Hello, I am trying to access an external WFS with MapServer as client to cascade it. I get the following error message: msBuildWFSLayerPostRequest(): WFS connection error. MapServer supports only WFS 1.0.0 or 0.0.14 (please verify the version metadata wfs_version). Indeed the external server only sends version 1.1.0 and my mapfile has: ... METADATA wfs_version1.1.0 ... Now when I search on the net, I find bug reports about WMS 1.1.0 and MapServer but no information if I can use it as a 1.1.0 client at all. And if so, do I need to use something specific to activate it? I'm on a German Ubuntu 14.04 64bit with Apache2 and mapserv -v says: MapServer version 6.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=GD SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Thanks for looking into this. Best Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Daniel Morissette T: +1 418-696-5056 #201 http://www.mapgears.com/ Provider of Professional MapServer Support since 2000 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users