<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Arnd, Chris<br>
<br>
<br>
Okay, so OpenLayers always does default url encoding on the request.
This goes wrong if the encoded request string is redirected.<br>
So<br>
1 (direct)<br>
<a class="moz-txt-link-freetext" href="http://mapserver.mnp.nl/wmsconnector/com.esri.wms.Esrimap/schiphol2005_a?LAYERS=11&FORMAT=image%2Fgif&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A28992&BBOX=74760.737774%2C461772.085076%2C162919.856834%2C492040.402065&WIDTH=1666&HEIGHT=572">http://mapserver.mnp.nl/wmsconnector/com.esri.wms.Esrimap/schiphol2005_a?LAYERS=11&amp;FORMAT=image%2Fgif&amp;TRANSPARENT=true&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;STYLES=&amp;EXCEPTIONS=application%2Fvnd.ogc.se_inimage&amp;SRS=EPSG%3A28992&amp;BBOX=74760.737774%2C461772.085076%2C162919.856834%2C492040.402065&amp;WIDTH=1666&amp;HEIGHT=572</a><br>
works<br>
2 (redirected to mapserver.mnp.nl)<br>
<a class="moz-txt-link-freetext" href="http://milntj34.rivm.nl/wmsconnector/com.esri.wms.Esrimap/schiphol2005_a?LAYERS=11&FORMAT=image%2Fgif&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A28992&BBOX=74760.737774%2C461772.085076%2C162919.856834%2C492040.402065&WIDTH=1666&HEIGHT=572">http://milntj34.rivm.nl/wmsconnector/com.esri.wms.Esrimap/schiphol2005_a?LAYERS=11&amp;FORMAT=image%2Fgif&amp;TRANSPARENT=true&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;STYLES=&amp;EXCEPTIONS=application%2Fvnd.ogc.se_inimage&amp;SRS=EPSG%3A28992&amp;BBOX=74760.737774%2C461772.085076%2C162919.856834%2C492040.402065&amp;WIDTH=1666&amp;HEIGHT=572</a><br>
does not work<br>
<br>
<br>
I don' see why urlencoding has to taken place. This might be necessary
only if a proxy was set.<br>
I suppose Arnd is right about his suggestion that OpenLayers should not
encode the request. It's much like setting an &lt;IMG SRC /&gt; isn't
it.<br>
You might add javascript's unescape() function instead of removing the
OpenLayers.Util.getParameterString.<br>
<br>
How about a setting:&nbsp; mylayer.encode = false;<br>
Or rather, not encode at all unless explicitly said:
mylayer.encoding=true<br>
<br>
Regards, Huub<br>
<br>
<br>
Arnd Wippermann wrote:
<blockquote cite="mid:E1IhsLo-0002Xj-00@smtp06.web.de" type="cite">
  <pre wrap="">With overwriting OpenLayers.Util.getParameterString to prevent the encoding
the WMS
<a class="moz-txt-link-freetext" href="http://milntj34.rivm.nl/wmsconnector/com.esri.wms.Esrimap/schiphol2005_a?req">http://milntj34.rivm.nl/wmsconnector/com.esri.wms.Esrimap/schiphol2005_a?req</a>
uest=getcapabilities&amp;service=wms delivers the map.

&gt;From WMS specification 1.1.1:

6.2.1 Reserved characters in HTTP GET URLs 
The URL specification [IETF RFC 2396] reserves particular characters as
significant and 
requires that these be escaped when they might conflict with their defined
usage.  The 
present WMS specification explicitly reserves several of these characters
for use in the 
query portion of HTTP GET requests.  When the characters "?", "&amp;", "=", "/",
":" and "," 
appear in one of the roles defined in Table 1, they are to appear literally
in the URL.  
When such characters appear elsewhere (for example, in the value of a
parameter), they 
are to be encoded as defined in [IETF RFC 2396]. 

This means the OpenLayers API is wrong to encode image/png or EPSG:4326 etc.

Mit freundlichen Gr&uuml;ssen

Arnd Wippermann
<a class="moz-txt-link-freetext" href="http://gis.ibbeck.de/ginfo/">http://gis.ibbeck.de/ginfo/</a>






-----Urspr&uuml;ngliche Nachricht-----
Von: <a class="moz-txt-link-abbreviated" href="mailto:crschmidt@metacarta.com">crschmidt@metacarta.com</a> [<a class="moz-txt-link-freetext" href="mailto:crschmidt@metacarta.com">mailto:crschmidt@metacarta.com</a>] 
Gesendet: Dienstag, 16. Oktober 2007 21:18
An: Arnd Wippermann
Cc: 'huub fleuren'; <a class="moz-txt-link-abbreviated" href="mailto:users@openlayers.org">users@openlayers.org</a>
Betreff: Re: [OpenLayers-Users] redirected maprequests

On Tue, Oct 16, 2007 at 07:02:51PM +0200, Arnd Wippermann wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">With OL Version 1.0 the WMS works all right.
 
Looking at the code I don't find where the encoding takes places. 
Where I have to look?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
OpenLayers.Util.getParameterString. 

Regards,
--
Christopher Schmidt
MetaCarta

_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@openlayers.org">Users@openlayers.org</a>
<a class="moz-txt-link-freetext" href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a>




  </pre>
</blockquote>
<br>
</body>
</html>