<div style="font-family: arial; font-size: 14px;"><div fr-original-style="" id="isPasted" style="box-sizing: border-box;">Bjørn,</div><div fr-original-style="" style="box-sizing: border-box;"><br fr-original-style="" style="box-sizing: border-box;"></div><div fr-original-style="" style="box-sizing: border-box;">  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?).</div><div fr-original-style="" style="box-sizing: border-box;"><br fr-original-style="" style="box-sizing: border-box;"></div><div fr-original-style="" style="box-sizing: border-box;">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.</div><div fr-original-style="" style="box-sizing: border-box;"><br fr-original-style="" style="box-sizing: border-box;"></div><div fr-original-style="" style="box-sizing: border-box;">Thanks again!</div><div fr-original-style="" style="box-sizing: border-box;">Brent Fraser</div><div fr-original-style="" style="box-sizing: border-box;" contenteditable="false"><span fr-original-style="" style="box-sizing: border-box;"> </span></div><div fr-original-style="" style="box-sizing: border-box;"><br fr-original-style="" style="box-sizing: border-box;"></div><hr id="previousmessagehr" fr-original-style="" style="box-sizing: border-box; clear: both; user-select: none;"><div fr-original-style="" style="box-sizing: border-box;"><span fr-original-style="" style="box-sizing: border-box;"><strong fr-original-style="" style="box-sizing: border-box; font-weight: 700;">From</strong>: "Bjørn Ove Grøtan" <bjorn.ove@grotan.com><br fr-original-style="" style="box-sizing: border-box;"><strong fr-original-style="" style="box-sizing: border-box; font-weight: 700;">Sent</strong>: 12/31/22 5:47 AM<br fr-original-style="" style="box-sizing: border-box;"><strong fr-original-style="" style="box-sizing: border-box; font-weight: 700;">To</strong>: Brent Fraser <bfraser@geoanalytic.com><br fr-original-style="" style="box-sizing: border-box;"><strong fr-original-style="" style="box-sizing: border-box; font-weight: 700;">Cc</strong>: "mapserver-users@lists.osgeo.org" <mapserver-users@lists.osgeo.org><br fr-original-style="" style="box-sizing: border-box;"><strong fr-original-style="" style="box-sizing: border-box; font-weight: 700;">Subject</strong>: Re: [MapServer-users] Link in SLD doc returns an exception</span></div><div fr-original-style="" style="box-sizing: border-box;"><br fr-original-style="" style="box-sizing: border-box;"></div><div fr-original-style="" style="box-sizing: border-box;"><br fr-original-style="" style="box-sizing: border-box;"></div><div fr-original-style="" style="box-sizing: border-box;">Brent Fraser:</div><div fr-original-style="" style="box-sizing: border-box;">> Hi All,</div><div fr-original-style="" style="box-sizing: border-box;">></div><div fr-original-style="" style="box-sizing: border-box;">> 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</div><div fr-original-style="" style="box-sizing: border-box;">></div><div fr-original-style="" style="box-sizing: border-box;">> <a fr-original-style="" href="https://demo.mapserver.org/cgi-bin/wms?SERVICE=wms&VERSION=1.1.1&REQUEST=GetMap&LAYERS=country_bounds&FORMAT=png&WIDTH=400&HEIGHT=300&SRS=EPSG:4326&STYLES=&BBOX=-180.0,-90.0,180.0,90.0&TRANSPARENT=TRUE&SLD=https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml" rel="noopener noreferrer" style="box-sizing: border-box; color: rgb(0, 102, 147); text-decoration: underline; user-select: auto;" target="_blank" rel="noopener noreferrer">https://demo.mapserver.org/cgi-bin/wms?SERVICE=wms&VERSION=1.1.1&REQUEST=GetMap&LAYERS=country_bounds&FORMAT=png&WIDTH=400&HEIGHT=300&SRS=EPSG:4326&STYLES=&BBOX=-180.0,-90.0,180.0,90.0&TRANSPARENT=TRUE&SLD=https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml</a></div><div fr-original-style="" style="box-sizing: border-box;">></div><div fr-original-style="" style="box-sizing: border-box;">> The link looks good but it returns an exception:</div><div fr-original-style="" style="box-sizing: border-box;">></div><div fr-original-style="" style="box-sizing: border-box;">> <?xml version='1.0' encoding="UTF-8" standalone="no" ?></div><div fr-original-style="" style="box-sizing: border-box;">> <!DOCTYPE ServiceExceptionReport SYSTEM "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd"></div><div fr-original-style="" style="box-sizing: border-box;">> <ServiceExceptionReport version="1.1.1"></div><div fr-original-style="" style="box-sizing: border-box;">> <ServiceException></div><div fr-original-style="" style="box-sizing: border-box;">> msSLDApplySLDURL: WMS server error. Could not open SLD <a fr-original-style="" href="https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml" rel="noopener noreferrer" style="box-sizing: border-box; color: rgb(0, 102, 147); text-decoration: underline; user-select: auto;" target="_blank" rel="noopener noreferrer">https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml</a> 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.</div><div fr-original-style="" style="box-sizing: border-box;">> msHTTPExecuteRequests(): HTTP request error. HTTP GET request failed with status 404 () for <a fr-original-style="" href="https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml" rel="noopener noreferrer" style="box-sizing: border-box; color: rgb(0, 102, 147); text-decoration: underline; user-select: auto;" target="_blank" rel="noopener noreferrer">https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml</a></div><div fr-original-style="" style="box-sizing: border-box;">> </ServiceException></div><div fr-original-style="" style="box-sizing: border-box;">> </ServiceExceptionReport></div><div fr-original-style="" style="box-sizing: border-box;">></div><div fr-original-style="" style="box-sizing: border-box;">> Is the demo in a repo somewhere or does someone have some insight? Thanks!</div><div fr-original-style="" style="box-sizing: border-box;"><br fr-original-style="" style="box-sizing: border-box;"></div><div fr-original-style="" style="box-sizing: border-box;">The error message is correct,</div><div fr-original-style="" style="box-sizing: border-box;"><a fr-original-style="" href="https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml" rel="noopener noreferrer" style="box-sizing: border-box; color: rgb(0, 102, 147); text-decoration: underline; user-select: auto;" target="_blank" rel="noopener noreferrer">https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml</a> returns a 404</div><div fr-original-style="" style="box-sizing: border-box;">Page not found, The root folder at /ogc-demos/ has been removed at some point.</div><div fr-original-style="" style="box-sizing: border-box;"><br fr-original-style="" style="box-sizing: border-box;"></div><div fr-original-style="" style="box-sizing: border-box;">Be aware though, that not all WMS-servers allow (by configuration) external</div><div fr-original-style="" style="box-sizing: border-box;">hosted SLD-files due to potential XXE (XML eXternal Entity) vulnerability,</div><div fr-original-style="" style="box-sizing: border-box;"><br fr-original-style="" style="box-sizing: border-box;"></div><div fr-original-style="" style="box-sizing: border-box;">Also might be of interrest: the Mapserver implementation of GetStyle-request</div><div fr-original-style="" style="box-sizing: border-box;">(return SLD for a given layer) has some limitations on line-symbols where</div><div fr-original-style="" style="box-sizing: border-box;">images (png) are placed along the line symbol, and same with polygon fills</div><div fr-original-style="" style="box-sizing: border-box;">using a repeated png-file as fill - but simple polygon symbologies with a solid</div><div fr-original-style="" style="box-sizing: border-box;">fill color works as expected.</div><div fr-original-style="" style="box-sizing: border-box;"><br fr-original-style="" style="box-sizing: border-box;"></div><div fr-original-style="" style="box-sizing: border-box;">--</div><div fr-original-style="" style="box-sizing: border-box;">Kind regards</div><div fr-original-style="" style="box-sizing: border-box;"><br fr-original-style="" style="box-sizing: border-box;"></div><div fr-original-style="" style="box-sizing: border-box;">Bjørn Ove Grøtan</div></div>