<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>Hi all,</div>
<div><br>
</div>
<div>We are consuming WMS services hosted by ESRI ArcGIS Server 10.0.  The server was upgraded to ArcGIS Server 10.2.2 and we no longer can access layer names with spaces.</div>
<div><br>
</div>
<div>This is the server’s capabilities.</div>
<div>http://ndgishub.nd.gov/arcgis/services/All_Elevation/MapServer/WMSServer?request=GetCapabilities&service=WMS</div>
<div><br>
</div>
<div>This is the layer I am using.</div>
<div><br>
</div>
<div>
<div>LAYER</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span># DEBUG 5</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>CONNECTIONTYPE WMS</div>
<div><span class="Apple-tab-span" style="white-space: pre;"></span>CONNECTION "http://ndgishub.nd.gov/arcgis/services/All_Elevation/MapServer/WMSServer?"</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>METADATA</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>"wms_name" "Topomap DRG 250k"</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>"wms_format" "image/png"</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>"wms_server_version" "1.1.1"</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>"wms_srs" "EPSG:2266"</div>
<div><span class="Apple-tab-span" style="white-space: pre;"></span>END</div>
<div><span class="Apple-tab-span" style="white-space: pre;"></span>TYPE RASTER</div>
<div><span class="Apple-tab-span" style="white-space: pre;"></span>STATUS OFF</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>NAME "USGS DRG 250k Topo Maps"</div>
<div>END</div>
</div>
<div><br>
</div>
<div>Mapserver encodes this request as follows.  Notice that the layer name, which is ‘Topomap DRG 250k’, is encoded with the spaces becoming the ‘+’ character.</div>
<div><br>
</div>
<div>http://ndgishub.nd.gov/arcgis/services/All_Elevation/MapServer/WMSServer?LAYERS=Topomap+DRG+250k&REQUEST=map&WMTVER=1.0.0&SERVICE=WMS&FORMAT=image/png&STYLES=&HEIGHT=1146&SRS=EPSG:2266&WIDTH=1271&BBOX=1906240.15992838,596656.333359479,2119730.85012732,789150.692893686&TRANSPARENT=TRUE&EXCEPTIONS=INIMAGE</div>
<div><br>
</div>
<div>This returns the error in an image that says “Parameter ‘layers’ contains unacceptable layer names.”</div>
<div><br>
</div>
<div>When I replace the + in the layer name with %20, LAYERS=Topomap+DRG+250k become LAYERS=Topomap%20DRG%20250k and the request becomes the following.</div>
<div><br>
</div>
<div>http://ndgishub.nd.gov/arcgis/services/All_Elevation/MapServer/WMSServer?LAYERS=Topomap%20DRG%20250k&REQUEST=map&WMTVER=1.0.0&SERVICE=WMS&FORMAT=image/png&STYLES=&HEIGHT=1146&SRS=EPSG:2266&WIDTH=1271&BBOX=1906240.15992838,596656.333359479,2119730.85012732,789150.692893686&TRANSPARENT=TRUE&EXCEPTIONS=INIMAGE</div>
<div><br>
</div>
<div>That request works.  Obviously, ESRI is no longer decoding + as a space and therefore does not recognize the layer name with spaces.  </div>
<div><br>
</div>
<div>Is there any way I can have mapserver encode all characters using percent-encoding, or at least encode spaces as %20 instead of a + character.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>
<div>
<div><br>
</div>
<span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; border-spacing: 0px;"><span class="Apple-style-span" style="font-family: Calibri, sans-serif; font-size: 14px; "><span class="Apple-style-span" style="font-family: Calibri; ">Paul
 Moen</span><span class="Apple-style-span" style="font-family: Calibri; "><br>
</span><span class="Apple-style-span" style="font-family: Calibri; "><a href="mailto:pmoen@nd.gov" style="color: blue;">pmoen@nd.gov</a></span><span class="Apple-style-span" style="font-family: Calibri; "><br>
</span><span class="Apple-style-span" style="font-family: Calibri; ">701-328-2434</span></span><br>
<br>
</span></div>
</div>
</body>
</html>