Re: [mapserver-users] [mapserver-dev] FW: WMS request fails when spaces are encoded as plus symbol in query part of URL

2014-08-26 Thread Rahkonen Jukka (Tike)
Hi,

With a help from the local ESRI support this case is now filed into ESRI bug 
tracker and developers together with something called UAG are now considering 
what to do to with it.

-Jukka Rahkonen-



Hi,

I made some more testing. It seems that the changed behaviour in ArcGIS Server 
10.2.2 affects also other software:
- QGIS 2.0 *can* read layers with spaces in the layer names
- OpenJUMP 1.7 *can't* because it changes spaces to + signs in GetMaps
- Geoserver 2.6 RC1 *can't* cascade layers and the reason is probably the same.

Does anybody know where the ESRI bug tracker is? I would like to file a ticket.

-Jukka-

Rahkonen Jukka wrote:



 Hi,

 What if I have mapfiles in directories my mapfiles and in my+mapfiles 
 (made
 a test and they seem to be OK for Windows) and I use WMS urls
 http://host.com/cgi-bin/mapserv.exe?map=my mapfiles/demo.map and urls
 http://host.com/cgi-bin/mapserv.exe?map=my+mapfiles/demo.map?

 If user sends map=my+mapfiles then the listening party should interpret 
 that +
 means space and search mapfiles from my mapfiles. Theoretical example but
 somehow I feel that using per cent encoding in every place would be more safe
 though not as compact.

 How about the ä case and %C3%A4 vs. %E4? Mapserver generates %E4's
 now and the ArcGIS WMS I should cascade will not accept it even if the problem
 with the space character is solved. Following RFC3986 would solve this 
 problem.

 -Jukka Rahkonen-


 Lime, Steve D wrote:


  The bit of reading I've done indicates that +'s for spaces are still
  allowed by the rfc3986.txt. The + character is still a valid delimiter
  in the query portion of the string. It's silly for ESRI to not support
  either - I mean the trend is towards more compact URLs. MapServer CGI
 processing handles %20 or +...
 
  Adding a switch to toggle + vs %20 encoding would be painful.
 
  Steve
 
  -Original Message-
  From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
  boun...@lists.osgeo.org] On Behalf Of Rahkonen Jukka (Tike)
  Sent: Thursday, August 21, 2014 8:28 AM
  To: Mapserver-Users (mapserver-users@lists.osgeo.org)
  Subject: Re: [mapserver-users] [mapserver-dev] FW: WMS request fails
  when spaces are encoded as plus symbol in query part of URL
 
  Hi,
 
  A little bit more information. Here is a GetMap request that returns
  an image from ArcGIS server. Space is changed into %20 and letter
  ä is changed into %C3%A4 . This, according to
  http://www.albionresearch.com/misc/urlencode.php, seems to implement
  RFC3986.
 
 
 http://gtkdata.gtk.fi/arcgis/services/GTKWMS/MapServer/WMSServer?REQUE
  S
 T=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=459HEIGHT=346LAYER
 
 S=Suomen%20maaper%C3%A4kartta%201:1%2%2TRANSPARENT=T
 
 RUEFORMAT=image%2FpngBBOX=434844.4854575534,7035986.957235612,
  452739.30027509434,7144417.839725949SRS=EPSG:3067STYLES=
 
  The mode where space is encoded as + seems to be something that is
  called
  RFC2396 mode. In this mode letter ä will become %E4. The
  following test where I have only changed %C3%A4  into %E4 proves
  that ArcGIS server does not support RFC2396 mode.
 
 
 http://gtkdata.gtk.fi/arcgis/services/GTKWMS/MapServer/WMSServer?REQUE
  S
 T=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=459HEIGHT=346LAYER
 
 S=Suomen%20maaper%E4kartta%201:1%2%2TRANSPARENT=TRUE
 
 FORMAT=image%2FpngBBOX=434844.4854575534,7035986.957235612,452
  739.30027509434,7144417.839725949SRS=EPSG:3067STYLES=
 
  If http://www.ietf.org/rfc/rfc3986.txt is newer than
  http://www.ietf.org/rfc/rfc2396.txt I can imagine that there are
  servers which support either the old, or the new, or both, or neither.
  Should ther be a
  RFC2396/RFC3986 switch for selecting the URL-encoding method to use?
  Or is
  RFC2396 deprecated and ESRI is doing the right thing by supporting
  only
  RFC3986 and Mapserver should do the same?
 
 
  -Jukka Rahkonen-
 
 
  Rahkonen Jukka wrote:
  
   Hi,
  
   Here is an ArcGIS WMS to  test with.
  
 
 http://gtkdata.gtk.fi/arcgis/services/GTKWMS/GTKWMS/MapServer/WMSServe
   r?request=GetCapabilitiesservice=WMS
  
   Do it quickly because I have asked the service provider to change
   the layer names, and guess what - because I could not make our
   Mapserver to cascade the service. You will find layer names like
   NameMaaperä
   1:20 000; 1:50 000/Name
  
   I would really much like to know also how the non-ascii characters
   should be handled in the mapfile when cascading such layers.
  
   -Jukka Rahkonen-
  
  
  
   Jeff McKenna wrote:
  
spaces are encoded as plus symbol in query part of URL
   
I agree it's a change that should slip in now for 7.0, but I hope
those with later ArcServer versions can test it in the beta (or we
have one volunteer to let us use their Arc WMS instance for testing).
   
-jeff
   
   
   
On 2014-08-20 1:52 PM, Lime, Steve D (MNIT) wrote:
 Devs: Is this a change that we should make for 7.0? Seems
  

Re: [mapserver-users] [mapserver-dev] FW: WMS request fails when spaces are encoded as plus symbol in query part of URL

2014-08-21 Thread Rahkonen Jukka (Tike)
Hi,

A little bit more information. Here is a GetMap request that returns an image 
from ArcGIS server. Space is changed into %20 and letter ä is changed into 
%C3%A4 . This, according to http://www.albionresearch.com/misc/urlencode.php, 
seems to implement RFC3986.

http://gtkdata.gtk.fi/arcgis/services/GTKWMS/MapServer/WMSServer?REQUEST=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=459HEIGHT=346LAYERS=Suomen%20maaper%C3%A4kartta%201:1%2%2TRANSPARENT=TRUEFORMAT=image%2FpngBBOX=434844.4854575534,7035986.957235612,452739.30027509434,7144417.839725949SRS=EPSG:3067STYLES=

The mode where space is encoded as + seems to be something that is called 
RFC2396 mode. In this mode letter ä will become %E4. The following test 
where I have only changed %C3%A4  into %E4 proves that ArcGIS server does 
not support RFC2396 mode.

http://gtkdata.gtk.fi/arcgis/services/GTKWMS/MapServer/WMSServer?REQUEST=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=459HEIGHT=346LAYERS=Suomen%20maaper%E4kartta%201:1%2%2TRANSPARENT=TRUEFORMAT=image%2FpngBBOX=434844.4854575534,7035986.957235612,452739.30027509434,7144417.839725949SRS=EPSG:3067STYLES=

If http://www.ietf.org/rfc/rfc3986.txt is newer than 
http://www.ietf.org/rfc/rfc2396.txt I can imagine that there are servers which 
support either the old, or the new, or both, or neither. Should ther be a 
RFC2396/RFC3986 switch for selecting the URL-encoding method to use? Or is 
RFC2396 deprecated and ESRI is doing the right thing by supporting only RFC3986 
and Mapserver should do the same?


-Jukka Rahkonen-


Rahkonen Jukka wrote:
 
 Hi,
 
 Here is an ArcGIS WMS to  test with.
 http://gtkdata.gtk.fi/arcgis/services/GTKWMS/GTKWMS/MapServer/WMSServe
 r?request=GetCapabilitiesservice=WMS
 
 Do it quickly because I have asked the service provider to change the layer
 names, and guess what - because I could not make our Mapserver to cascade
 the service. You will find layer names like NameMaaperä 1:20 000; 1:50
 000/Name
 
 I would really much like to know also how the non-ascii characters should be
 handled in the mapfile when cascading such layers.
 
 -Jukka Rahkonen-
 
 
 
 Jeff McKenna wrote:
 
  spaces are encoded as plus symbol in query part of URL
 
  I agree it's a change that should slip in now for 7.0, but I hope
  those with later ArcServer versions can test it in the beta (or we
  have one volunteer to let us use their Arc WMS instance for testing).
 
  -jeff
 
 
 
  On 2014-08-20 1:52 PM, Lime, Steve D (MNIT) wrote:
   Devs: Is this a change that we should make for 7.0? Seems reasonable
   but I'm not sure what the side effects might be.
  
   Steve
  
   *From:*Moen, Paul T. [mailto:pm...@nd.gov]
   *Sent:* Wednesday, August 20, 2014 9:44 AM
   *To:* Lime, Steve D (MNIT); mapserver-users@lists.osgeo.org
   *Subject:* Re: [mapserver-users] WMS request fails when spaces are
   encoded as plus symbol in query part of URL
  
   Steve,
  
   You are right about the outcome of 1 and 2.  1 encodes the % and 2
   throws the following error.
  
   msBuildWMSLayerURLBase(): One of wms_onlineresource,
   wms_server_version, wms_name metadata is missing in layer USGS DRG
   250k Topo Maps.  Please either provide a valid CONNECTION URL, or
   provide those values in the layer's metadata.\n\n
  
   I found the function as you said and
  
   I removed the
  
 if (*i == ' ')
  
  *j = '+';
  
else
  
   from the function then recompiled.
  
   char *msEncodeUrlExcept(const char *data, const char except)
  
   {
  
  char *hex = 0123456789ABCDEF;
  
  const char *i;
  
  char  *j, *code;
  
  int   inc;
  
  unsigned char ch;
  
  for (inc=0, i=data; *i!='\0'; i++)
  
if (msEncodeChar(*i))
  
  inc += 2;
  
  code = (char*)msSmallMalloc(strlen(data)+inc+1);
  
  for (j=code, i=data; *i!='\0'; i++, j++) {
  
if ( except != '\0'  *i == except ) {
  
  *j = except;
  
} else if (msEncodeChar(*i)) {
  
  ch = *i;
  
  *j++ = '%';
  
  *j++ = hex[ch/16];
  
  *j   = hex[ch%16];
  
} else
  
  *j = *i;
  
  }
  
  *j = '\0';
  
  return code;
  
   }
  
   Everything works again after a mapserver recompile, install and
   finally a restart of apache.  Thanks so much for the path to the solution.
  
   Paul Moen
   pm...@nd.gov mailto:pm...@nd.gov
   701-328-2434
  
   *From: *Lime, Steve D (MNIT) steve.l...@state.mn.us
   mailto:steve.l...@state.mn.us
   *Date: *Wednesday, August 20, 2014 at 12:41 AM
   *To: *Paul Moen pm...@nd.gov mailto:pm...@nd.gov,
   mapserver-users@lists.osgeo.org
   mailto:mapserver-users@lists.osgeo.org
   mapserver-users@lists.osgeo.org
   mailto:mapserver-users@lists.osgeo.org
   *Subject: *RE: [mapserver-users] WMS request fails when spaces are
   encoded as plus symbol in query part of URL
  
   Hmmm... Nice backwards 

Re: [mapserver-users] [mapserver-dev] FW: WMS request fails when spaces are encoded as plus symbol in query part of URL

2014-08-21 Thread Lime, Steve D (MNIT)
The bit of reading I've done indicates that +'s for spaces are still allowed by 
the rfc3986.txt. The + character is still a valid delimiter in the query 
portion of the string. It's silly for ESRI to not support either - I mean the 
trend is towards more compact URLs. MapServer CGI processing handles %20 or 
+... 

Adding a switch to toggle + vs %20 encoding would be painful.

Steve

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Rahkonen Jukka 
(Tike)
Sent: Thursday, August 21, 2014 8:28 AM
To: Mapserver-Users (mapserver-users@lists.osgeo.org)
Subject: Re: [mapserver-users] [mapserver-dev] FW: WMS request fails when 
spaces are encoded as plus symbol in query part of URL

Hi,

A little bit more information. Here is a GetMap request that returns an image 
from ArcGIS server. Space is changed into %20 and letter ä is changed into 
%C3%A4 . This, according to http://www.albionresearch.com/misc/urlencode.php, 
seems to implement RFC3986.

http://gtkdata.gtk.fi/arcgis/services/GTKWMS/MapServer/WMSServer?REQUEST=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=459HEIGHT=346LAYERS=Suomen%20maaper%C3%A4kartta%201:1%2%2TRANSPARENT=TRUEFORMAT=image%2FpngBBOX=434844.4854575534,7035986.957235612,452739.30027509434,7144417.839725949SRS=EPSG:3067STYLES=

The mode where space is encoded as + seems to be something that is called 
RFC2396 mode. In this mode letter ä will become %E4. The following test 
where I have only changed %C3%A4  into %E4 proves that ArcGIS server does 
not support RFC2396 mode.

http://gtkdata.gtk.fi/arcgis/services/GTKWMS/MapServer/WMSServer?REQUEST=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=459HEIGHT=346LAYERS=Suomen%20maaper%E4kartta%201:1%2%2TRANSPARENT=TRUEFORMAT=image%2FpngBBOX=434844.4854575534,7035986.957235612,452739.30027509434,7144417.839725949SRS=EPSG:3067STYLES=

If http://www.ietf.org/rfc/rfc3986.txt is newer than 
http://www.ietf.org/rfc/rfc2396.txt I can imagine that there are servers which 
support either the old, or the new, or both, or neither. Should ther be a 
RFC2396/RFC3986 switch for selecting the URL-encoding method to use? Or is 
RFC2396 deprecated and ESRI is doing the right thing by supporting only RFC3986 
and Mapserver should do the same?


-Jukka Rahkonen-


Rahkonen Jukka wrote:
 
 Hi,
 
 Here is an ArcGIS WMS to  test with.
 http://gtkdata.gtk.fi/arcgis/services/GTKWMS/GTKWMS/MapServer/WMSServe
 r?request=GetCapabilitiesservice=WMS
 
 Do it quickly because I have asked the service provider to change the 
 layer names, and guess what - because I could not make our Mapserver 
 to cascade the service. You will find layer names like NameMaaperä 
 1:20 000; 1:50 000/Name
 
 I would really much like to know also how the non-ascii characters 
 should be handled in the mapfile when cascading such layers.
 
 -Jukka Rahkonen-
 
 
 
 Jeff McKenna wrote:
 
  spaces are encoded as plus symbol in query part of URL
 
  I agree it's a change that should slip in now for 7.0, but I hope 
  those with later ArcServer versions can test it in the beta (or we 
  have one volunteer to let us use their Arc WMS instance for testing).
 
  -jeff
 
 
 
  On 2014-08-20 1:52 PM, Lime, Steve D (MNIT) wrote:
   Devs: Is this a change that we should make for 7.0? Seems 
   reasonable but I'm not sure what the side effects might be.
  
   Steve
  
   *From:*Moen, Paul T. [mailto:pm...@nd.gov]
   *Sent:* Wednesday, August 20, 2014 9:44 AM
   *To:* Lime, Steve D (MNIT); mapserver-users@lists.osgeo.org
   *Subject:* Re: [mapserver-users] WMS request fails when spaces are 
   encoded as plus symbol in query part of URL
  
   Steve,
  
   You are right about the outcome of 1 and 2.  1 encodes the % and 2 
   throws the following error.
  
   msBuildWMSLayerURLBase(): One of wms_onlineresource, 
   wms_server_version, wms_name metadata is missing in layer USGS DRG 
   250k Topo Maps.  Please either provide a valid CONNECTION URL, or 
   provide those values in the layer's metadata.\n\n
  
   I found the function as you said and
  
   I removed the
  
 if (*i == ' ')
  
  *j = '+';
  
else
  
   from the function then recompiled.
  
   char *msEncodeUrlExcept(const char *data, const char except)
  
   {
  
  char *hex = 0123456789ABCDEF;
  
  const char *i;
  
  char  *j, *code;
  
  int   inc;
  
  unsigned char ch;
  
  for (inc=0, i=data; *i!='\0'; i++)
  
if (msEncodeChar(*i))
  
  inc += 2;
  
  code = (char*)msSmallMalloc(strlen(data)+inc+1);
  
  for (j=code, i=data; *i!='\0'; i++, j++) {
  
if ( except != '\0'  *i == except ) {
  
  *j = except;
  
} else if (msEncodeChar(*i)) {
  
  ch = *i;
  
  *j++ = '%';
  
  *j++ = hex[ch/16];
  
  *j   = hex[ch%16];
  
} else
  
  *j = *i;
  
  

Re: [mapserver-users] [mapserver-dev] FW: WMS request fails when spaces are encoded as plus symbol in query part of URL

2014-08-21 Thread Rahkonen Jukka (Tike)
Hi,

What if I have mapfiles in directories my mapfiles and in my+mapfiles (made 
a test and they seem to be OK for Windows) and I use WMS urls  
http://host.com/cgi-bin/mapserv.exe?map=my mapfiles/demo.map and urls  
http://host.com/cgi-bin/mapserv.exe?map=my+mapfiles/demo.map?

If user sends map=my+mapfiles then the listening party should interpret that 
+ means space and search mapfiles from my mapfiles. Theoretical example but 
somehow I feel that using per cent encoding in every place would be more safe 
though not as compact.

How about the ä case and %C3%A4 vs. %E4? Mapserver generates %E4's now and 
the ArcGIS WMS I should cascade will not accept it even if the problem with the 
space character is solved. Following RFC3986 would solve this problem.

-Jukka Rahkonen-


Lime, Steve D wrote:

 
 The bit of reading I've done indicates that +'s for spaces are still allowed 
 by the
 rfc3986.txt. The + character is still a valid delimiter in the query portion 
 of the
 string. It's silly for ESRI to not support either - I mean the trend is 
 towards more
 compact URLs. MapServer CGI processing handles %20 or +...
 
 Adding a switch to toggle + vs %20 encoding would be painful.
 
 Steve
 
 -Original Message-
 From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] On Behalf Of Rahkonen Jukka (Tike)
 Sent: Thursday, August 21, 2014 8:28 AM
 To: Mapserver-Users (mapserver-users@lists.osgeo.org)
 Subject: Re: [mapserver-users] [mapserver-dev] FW: WMS request fails when
 spaces are encoded as plus symbol in query part of URL
 
 Hi,
 
 A little bit more information. Here is a GetMap request that returns an image
 from ArcGIS server. Space is changed into %20 and letter ä is changed into
 %C3%A4 . This, according to
 http://www.albionresearch.com/misc/urlencode.php, seems to implement
 RFC3986.
 
 http://gtkdata.gtk.fi/arcgis/services/GTKWMS/MapServer/WMSServer?REQUES
 T=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=459HEIGHT=346LAYER
 S=Suomen%20maaper%C3%A4kartta%201:1%2%2TRANSPARENT=T
 RUEFORMAT=image%2FpngBBOX=434844.4854575534,7035986.957235612,
 452739.30027509434,7144417.839725949SRS=EPSG:3067STYLES=
 
 The mode where space is encoded as + seems to be something that is called
 RFC2396 mode. In this mode letter ä will become %E4. The following test
 where I have only changed %C3%A4  into %E4 proves that ArcGIS server
 does not support RFC2396 mode.
 
 http://gtkdata.gtk.fi/arcgis/services/GTKWMS/MapServer/WMSServer?REQUES
 T=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=459HEIGHT=346LAYER
 S=Suomen%20maaper%E4kartta%201:1%2%2TRANSPARENT=TRUE
 FORMAT=image%2FpngBBOX=434844.4854575534,7035986.957235612,452
 739.30027509434,7144417.839725949SRS=EPSG:3067STYLES=
 
 If http://www.ietf.org/rfc/rfc3986.txt is newer than
 http://www.ietf.org/rfc/rfc2396.txt I can imagine that there are servers which
 support either the old, or the new, or both, or neither. Should ther be a
 RFC2396/RFC3986 switch for selecting the URL-encoding method to use? Or is
 RFC2396 deprecated and ESRI is doing the right thing by supporting only
 RFC3986 and Mapserver should do the same?
 
 
 -Jukka Rahkonen-
 
 
 Rahkonen Jukka wrote:
 
  Hi,
 
  Here is an ArcGIS WMS to  test with.
 
 http://gtkdata.gtk.fi/arcgis/services/GTKWMS/GTKWMS/MapServer/WMSServe
  r?request=GetCapabilitiesservice=WMS
 
  Do it quickly because I have asked the service provider to change the
  layer names, and guess what - because I could not make our Mapserver
  to cascade the service. You will find layer names like NameMaaperä
  1:20 000; 1:50 000/Name
 
  I would really much like to know also how the non-ascii characters
  should be handled in the mapfile when cascading such layers.
 
  -Jukka Rahkonen-
 
 
 
  Jeff McKenna wrote:
 
   spaces are encoded as plus symbol in query part of URL
  
   I agree it's a change that should slip in now for 7.0, but I hope
   those with later ArcServer versions can test it in the beta (or we
   have one volunteer to let us use their Arc WMS instance for testing).
  
   -jeff
  
  
  
   On 2014-08-20 1:52 PM, Lime, Steve D (MNIT) wrote:
Devs: Is this a change that we should make for 7.0? Seems
reasonable but I'm not sure what the side effects might be.
   
Steve
   
*From:*Moen, Paul T. [mailto:pm...@nd.gov]
*Sent:* Wednesday, August 20, 2014 9:44 AM
*To:* Lime, Steve D (MNIT); mapserver-users@lists.osgeo.org
*Subject:* Re: [mapserver-users] WMS request fails when spaces are
encoded as plus symbol in query part of URL
   
Steve,
   
You are right about the outcome of 1 and 2.  1 encodes the % and 2
throws the following error.
   
msBuildWMSLayerURLBase(): One of wms_onlineresource,
wms_server_version, wms_name metadata is missing in layer USGS DRG
250k Topo Maps.  Please either provide a valid CONNECTION URL, or
provide those values in the layer's metadata.\n\n
   
I found the function as you said and
   
I 

Re: [mapserver-users] [mapserver-dev] FW: WMS request fails when spaces are encoded as plus symbol in query part of URL

2014-08-21 Thread Rahkonen Jukka (Tike)
Hi,

I made some more testing. It seems that the changed behaviour in ArcGIS Server 
10.2.2 affects also other software:
- QGIS 2.0 *can* read layers with spaces in the layer names 
- OpenJUMP 1.7 *can't* because it changes spaces to + signs in GetMaps
- Geoserver 2.6 RC1 *can't* cascade layers and the reason is probably the same.

Does anybody know where the ESRI bug tracker is? I would like to file a ticket.

-Jukka-

Rahkonen Jukka wrote:


 
 Hi,
 
 What if I have mapfiles in directories my mapfiles and in my+mapfiles 
 (made
 a test and they seem to be OK for Windows) and I use WMS urls
 http://host.com/cgi-bin/mapserv.exe?map=my mapfiles/demo.map and urls
 http://host.com/cgi-bin/mapserv.exe?map=my+mapfiles/demo.map?
 
 If user sends map=my+mapfiles then the listening party should interpret 
 that +
 means space and search mapfiles from my mapfiles. Theoretical example but
 somehow I feel that using per cent encoding in every place would be more safe
 though not as compact.
 
 How about the ä case and %C3%A4 vs. %E4? Mapserver generates %E4's
 now and the ArcGIS WMS I should cascade will not accept it even if the problem
 with the space character is solved. Following RFC3986 would solve this 
 problem.
 
 -Jukka Rahkonen-
 
 
 Lime, Steve D wrote:
 
 
  The bit of reading I've done indicates that +'s for spaces are still
  allowed by the rfc3986.txt. The + character is still a valid delimiter
  in the query portion of the string. It's silly for ESRI to not support
  either - I mean the trend is towards more compact URLs. MapServer CGI
 processing handles %20 or +...
 
  Adding a switch to toggle + vs %20 encoding would be painful.
 
  Steve
 
  -Original Message-
  From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
  boun...@lists.osgeo.org] On Behalf Of Rahkonen Jukka (Tike)
  Sent: Thursday, August 21, 2014 8:28 AM
  To: Mapserver-Users (mapserver-users@lists.osgeo.org)
  Subject: Re: [mapserver-users] [mapserver-dev] FW: WMS request fails
  when spaces are encoded as plus symbol in query part of URL
 
  Hi,
 
  A little bit more information. Here is a GetMap request that returns
  an image from ArcGIS server. Space is changed into %20 and letter
  ä is changed into %C3%A4 . This, according to
  http://www.albionresearch.com/misc/urlencode.php, seems to implement
  RFC3986.
 
 
 http://gtkdata.gtk.fi/arcgis/services/GTKWMS/MapServer/WMSServer?REQUE
  S
 T=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=459HEIGHT=346LAYER
 
 S=Suomen%20maaper%C3%A4kartta%201:1%2%2TRANSPARENT=T
 
 RUEFORMAT=image%2FpngBBOX=434844.4854575534,7035986.957235612,
  452739.30027509434,7144417.839725949SRS=EPSG:3067STYLES=
 
  The mode where space is encoded as + seems to be something that is
  called
  RFC2396 mode. In this mode letter ä will become %E4. The
  following test where I have only changed %C3%A4  into %E4 proves
  that ArcGIS server does not support RFC2396 mode.
 
 
 http://gtkdata.gtk.fi/arcgis/services/GTKWMS/MapServer/WMSServer?REQUE
  S
 T=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=459HEIGHT=346LAYER
 
 S=Suomen%20maaper%E4kartta%201:1%2%2TRANSPARENT=TRUE
 
 FORMAT=image%2FpngBBOX=434844.4854575534,7035986.957235612,452
  739.30027509434,7144417.839725949SRS=EPSG:3067STYLES=
 
  If http://www.ietf.org/rfc/rfc3986.txt is newer than
  http://www.ietf.org/rfc/rfc2396.txt I can imagine that there are
  servers which support either the old, or the new, or both, or neither.
  Should ther be a
  RFC2396/RFC3986 switch for selecting the URL-encoding method to use?
  Or is
  RFC2396 deprecated and ESRI is doing the right thing by supporting
  only
  RFC3986 and Mapserver should do the same?
 
 
  -Jukka Rahkonen-
 
 
  Rahkonen Jukka wrote:
  
   Hi,
  
   Here is an ArcGIS WMS to  test with.
  
 
 http://gtkdata.gtk.fi/arcgis/services/GTKWMS/GTKWMS/MapServer/WMSServe
   r?request=GetCapabilitiesservice=WMS
  
   Do it quickly because I have asked the service provider to change
   the layer names, and guess what - because I could not make our
   Mapserver to cascade the service. You will find layer names like
   NameMaaperä
   1:20 000; 1:50 000/Name
  
   I would really much like to know also how the non-ascii characters
   should be handled in the mapfile when cascading such layers.
  
   -Jukka Rahkonen-
  
  
  
   Jeff McKenna wrote:
  
spaces are encoded as plus symbol in query part of URL
   
I agree it's a change that should slip in now for 7.0, but I hope
those with later ArcServer versions can test it in the beta (or we
have one volunteer to let us use their Arc WMS instance for testing).
   
-jeff
   
   
   
On 2014-08-20 1:52 PM, Lime, Steve D (MNIT) wrote:
 Devs: Is this a change that we should make for 7.0? Seems
 reasonable but I'm not sure what the side effects might be.

 Steve

 *From:*Moen, Paul T. [mailto:pm...@nd.gov]
 *Sent:* Wednesday, August 20, 2014 9:44 AM
 *To:* Lime, Steve D (MNIT);