Re: [MapServer-users] Link in SLD doc returns an exception

2023-01-01 Thread Brent Fraser
Hi Jeff,

I've filed an Issue in the docs.I haven't looked at the Mapserver code yet, 
but do you have any insight as to why I would get a "Cross-Origin Request 
Blocked" error from the foreign server when I include the SLD body (not the 
URL) in the get request using the SLD_BODY= parameter?

Thanks!
Brent


From: "Jeff McKenna" 
Sent: 1/1/23 6:57 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [MapServer-users] Link in SLD doc returns an exception

Happy new year Brent,

I have been updating the demo server with big changes, so your timing is
good: if you don't mind, it helps me if you file this as a ticket in the
documentation repository (I'll then tag it there as a demo server
ticket) : https://github.com/MapServer/MapServer-documentation

Thanks,

-jeff

--
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G
http://gatewaygeo.com/

On 2022-12-30 5:34 p.m., Brent Fraser wrote:
>
> Hi All,
>
> I'm experimenting with SLD and reading the MapServer doc.  On the SLD
> page under Server Side Support, it says "Test the remote SLD request"
> with a link to
>
> https://demo.mapserver.org/cgi-bin/wms?SERVICE=wms=1.1.1=GetMap=country_bounds=png=400=300=EPSG:4326==-180.0,-90.0,180.0,90.0=TRUE=https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml
>  
> <https://demo.mapserver.org/cgi-bin/wms?SERVICE=wms=1.1.1=GetMap=country_bounds=png=400=300=EPSG:4326==-180.0,-90.0,180.0,90.0=TRUE=https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml>
>
> The link looks good but it returns an exception:
>
> 
>  "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd;>
> 
> 
> msSLDApplySLDURL: WMS server error. Could not open SLD
> https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml
> <https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml> and
> save it in a temporary file. Please make sure that the sld url is valid
> and that the temporary path is set. The temporary path can be defined
> for example by setting TEMPPATH in the map file. Please check the
> MapServer documentation on temporary path settings.
> msHTTPExecuteRequests(): HTTP request error. HTTP GET request failed
> with status 404 () for
> https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml
> <https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml>
> 
> 
>
>
> Is the demo in a repo somewhere or does someone have some insight?  Thanks!
>
> Best regards,
> Brent Fraser
>
>
> ___
> 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
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Link in SLD doc returns an exception

2023-01-01 Thread Jeff McKenna

Happy new year Brent,

I have been updating the demo server with big changes, so your timing is 
good: if you don't mind, it helps me if you file this as a ticket in the 
documentation repository (I'll then tag it there as a demo server 
ticket) : https://github.com/MapServer/MapServer-documentation


Thanks,

-jeff


--
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G
http://gatewaygeo.com/




On 2022-12-30 5:34 p.m., Brent Fraser wrote:


Hi All,

I'm experimenting with SLD and reading the MapServer doc.  On the SLD 
page under Server Side Support, it says "Test the remote SLD request" 
with a link to


https://demo.mapserver.org/cgi-bin/wms?SERVICE=wms=1.1.1=GetMap=country_bounds=png=400=300=EPSG:4326==-180.0,-90.0,180.0,90.0=TRUE=https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml
 


The link looks good but it returns an exception:


"http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd;>



msSLDApplySLDURL: WMS server error. Could not open SLD 
https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml 
 and 
save it in a temporary file. Please make sure that the sld url is valid 
and that the temporary path is set. The temporary path can be defined 
for example by setting TEMPPATH in the map file. Please check the 
MapServer documentation on temporary path settings.
msHTTPExecuteRequests(): HTTP request error. HTTP GET request failed 
with status 404 () for 
https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml 






Is the demo in a repo somewhere or does someone have some insight?  Thanks!

Best regards,
Brent Fraser


___
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


Re: [MapServer-users] Link in SLD doc returns an exception

2022-12-31 Thread Brent Fraser
Bjørn,

Thanks for the info.  I'm not sure if I should file an Issue on the doc for the 
broken link, or on the demo for the missing file (no public GitHub repository 
for the demo?).

While testing the GeoMoose/OpenLayers client, I did see foreign WMS servers 
(not under my control) cause a "Cross-Origin Request Blocked" error.  This was 
unexpected as I had encoded the XML SLD document and included it in the GET 
request parameter SLD_BODY.  I could understand getting the error if I had used 
the alternative method of instead using SLD=http://... to reference an SLD 
document somewhere on the web, but I did not use that method.  I even removed 
the reference links in the header of the SLD, but I got the same error.

Thanks again!
Brent Fraser


From: "Bjørn Ove Grøtan" 
Sent: 12/31/22 5:47 AM
To: Brent Fraser 
Cc: "mapserver-users@lists.osgeo.org" 
Subject: Re: [MapServer-users] Link in SLD doc returns an exception

Brent Fraser:
> Hi All,
>
> I'm experimenting with SLD and reading the MapServer doc. On the SLD page 
> under Server Side Support, it says "Test the remote SLD request" with a link 
> to
>
> https://demo.mapserver.org/cgi-bin/wms?SERVICE=wms=1.1.1=GetMap=country_bounds=png=400=300=EPSG:4326==-180.0,-90.0,180.0,90.0=TRUE=https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml
>
> The link looks good but it returns an exception:
>
> 
>  "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd;>
> 
> 
> msSLDApplySLDURL: WMS server error. Could not open SLD 
> https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml and save it 
> in a temporary file. Please make sure that the sld url is valid and that the 
> temporary path is set. The temporary path can be defined for example by 
> setting TEMPPATH in the map file. Please check the MapServer documentation on 
> temporary path settings.
> msHTTPExecuteRequests(): HTTP request error. HTTP GET request failed with 
> status 404 () for 
> https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml
> 
> 
>
> Is the demo in a repo somewhere or does someone have some insight? Thanks!

The error message is correct,
https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml returns a 404
Page not found, The root folder at /ogc-demos/ has been removed at some point.

Be aware though, that not all WMS-servers allow (by configuration) external
hosted SLD-files due to potential XXE (XML eXternal Entity) vulnerability,

Also might be of interrest: the Mapserver implementation of GetStyle-request
(return SLD for a given layer) has some limitations on line-symbols where
images (png) are placed along the line symbol, and same with polygon fills
using a repeated png-file as fill - but simple polygon symbologies with a solid
fill color works as expected.

--
Kind regards

Bjørn Ove Grøtan
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Link in SLD doc returns an exception

2022-12-31 Thread Bjørn Ove Grøtan

Brent Fraser:
> Hi All,
> 
> I'm experimenting with SLD and reading the MapServer doc.  On the SLD page 
> under Server Side Support, it says "Test the remote SLD request" with a link 
> to
> 
> https://demo.mapserver.org/cgi-bin/wms?SERVICE=wms=1.1.1=GetMap=country_bounds=png=400=300=EPSG:4326==-180.0,-90.0,180.0,90.0=TRUE=https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml
> 
> The link looks good but it returns an exception:
> 
> 
>  "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd;>
> 
> 
> msSLDApplySLDURL: WMS server error. Could not open SLD 
> https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml and save it 
> in a temporary file. Please make sure that the sld url is valid and that the 
> temporary path is set. The temporary path can be defined for example by 
> setting TEMPPATH in the map file. Please check the MapServer documentation on 
> temporary path settings.
> msHTTPExecuteRequests(): HTTP request error. HTTP GET request failed with 
> status 404 () for 
> https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml
> 
> 
> 
> Is the demo in a repo somewhere or does someone have some insight?  Thanks!

The error message is correct,
https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml returns a 404
Page not found, The root folder at /ogc-demos/ has been removed at some point.

Be aware though, that not all WMS-servers allow (by configuration) external
hosted SLD-files due to potential XXE (XML eXternal Entity) vulnerability, 

Also might be of interrest: the Mapserver implementation of GetStyle-request
(return SLD for a given layer) has some limitations on line-symbols where
images (png) are placed along the line symbol, and same with polygon fills
using a repeated png-file as fill - but simple polygon symbologies with a solid
fill color works as expected.

-- 
Kind regards
 
Bjørn Ove Grøtan
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


[MapServer-users] Link in SLD doc returns an exception

2022-12-30 Thread Brent Fraser
Hi All,

I'm experimenting with SLD and reading the MapServer doc.  On the SLD page 
under Server Side Support, it says "Test the remote SLD request" with a link to

https://demo.mapserver.org/cgi-bin/wms?SERVICE=wms=1.1.1=GetMap=country_bounds=png=400=300=EPSG:4326==-180.0,-90.0,180.0,90.0=TRUE=https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml

The link looks good but it returns an exception:


http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd;>


msSLDApplySLDURL: WMS server error. Could not open SLD 
https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml and save it in 
a temporary file. Please make sure that the sld url is valid and that the 
temporary path is set. The temporary path can be defined for example by setting 
TEMPPATH in the map file. Please check the MapServer documentation on temporary 
path settings.
msHTTPExecuteRequests(): HTTP request error. HTTP GET request failed with 
status 404 () for 
https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml



Is the demo in a repo somewhere or does someone have some insight?  Thanks!

Best regards,
Brent Fraser


___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users