opengeospatial / ets-wms11

Executable Test Suite for WMS 1.1.X
0 stars 5 forks source link

value of INFO_FORMAT parameter not URL-encoded #47

Closed pomakis closed 8 years ago

pomakis commented 8 years ago

When the test suite sends the value of the INFO_FORMAT parameter, it doesn't URL-encode it. Thus, for example, when a WMS advertises a GetFeatureInfo format of:

application/gml+xml; version="3.2"

the test suite sends:

InFo_fOrMaT=application/gml+xml;version="3.2"

which is illegal because it isn't URL-encoded. The test suite should be sending:

InFo_fOrMaT=application%2Fgml%2Bxml%3B+version%3D%223.2%22

(This is similar to the WMS 1.3.0 CITE test issue #32, that was reported and resolved back in 2007.)

dstenger commented 8 years ago

Hello,

thank you for reporting.

Can you please name the test which is failing due to an non encoded URL? And if possible, can you provide a test server to reproduce the error?

wms:wmsops-getfeatureinfo-each-info_format for example sends an encoded request (e.g. ..&InFo_fOrMaT=application%2Fgml%2Bxml%3B+version%3D3.0&..).

pomakis commented 8 years ago

You wrote:

thank you for reporting.

Can you please name the test which is failing due to an non encoded URL? And if possible, can you provide a test server to reproduce the error?

wms:wmsops-getfeatureinfo-each-info_format for example sends an encoded request (e.g. ..&InFo_fOrMaT=application%2Fgml%2Bxml%3B+version%3D3.0&..).

The following WMS 1.1.1 service:

http://demo.cubewerx.com/cubewerx/cubeserv/cite_wms111?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.1.1

fails the following tests:

wms:basic_elements-param_rules-order_and_case-5 wms:wmsops-getfeatureinfo-params-feature_count-1 wms:wmsops-getfeatureinfo-params-feature_count-2 wms:wmsops-getfeatureinfo-params-query_layers-1 wms:wmsops-getfeatureinfo-params-query_layers-2 wms:wmsops-getfeatureinfo-params-query_layers-3 wms:wmsops-getfeatureinfo-params-query_layers-4

for this reason. It makes requests like the following:

http://demo.cubewerx.com/cubewerx/cubeserv/cite_wms111?&SrS=EPSG:4326&X=60&FoRmAt=image/png&InFo_fOrMaT=application/gml+xml;version="3.2"&Y=60&WiDtH=200&QuErY_LaYeRs=citedata_wms_111.Lakes&LaYeRs=citedata_wms_111.Lakes&BoGuS=ignored&BbOx=0,-0.0020,0.0040,0&VeRsIoN=1.1.1&HeIgHt=100&StYlEs=&ReQuEsT=GetFeatureInfo

Note the unencoded +, = and " characters in the value of InFo_fOrMaT.

Keith Pomakis pomakis@pobox.com http://www.pomakis.com/

dstenger commented 8 years ago

Yes, you are right. The list of tests you provided does not encode the INFO_FORMAT.

Regarding the fix: The test mentioned by me above (wms:wmsops-getfeatureinfo-each-info_format) can be used as a template, as this test encodes the INFO_FORMAT.

dstenger commented 8 years ago

A fix was created and is provided via pull request #49.

The pull request is tested and will be part of the next release.

dstenger commented 8 years ago

Pull request #49 was merged into master branch (after having done tests). Fix will be included in the next release.