Ticket #678 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

TRANSPARENT parameter case sensitivity

Reported by: openlayers Owned by:
Priority: major Milestone: 2.5 Release
Component: Layer.WMS Version: SVN
Keywords: Cc:
State:

Description

email: kablukiw AT gmail dot com

According to the WMS specs all parameter values are case sensitive (1.1.1 sec 6.4.1; 1.3.0 sec 6.8.1). In addition, in the specs (1.1.1 sec 7.2.3.9; 1.3.0 sec 7.3.3.9) the valid values for the TRANSPARENT parameter is TRUE|FALSE. However, the current OpenLayers implementation is looking for "true" as a value for TRANSPARENT which is not valid and thus will not make a correct WMS request if the transparent parameter is set to "TRUE".

Attachments

transparent_case_patch.txt Download (1.4 KB) - added by openlayers 6 years ago.
TRANSPARENT case patch
678.patch Download (0.7 KB) - added by sderle 6 years ago.
compromise... can't use toLowerCase easily because the value might be boolean, not string
transparent.patch Download (3.1 KB) - added by euzuro 6 years ago.
taking sde's patch and applying the same logic to WMS/Untiled. Goodness knows that it is embarrassing and wrong the way those two classes are the same and yet different. but those are the breaks right now. anyways. i've also augmented the wms layer's tests (not those of untiled because there *are* no those of untiled). alas alas. sigh

Change History

Changed 6 years ago by openlayers

TRANSPARENT case patch

Changed 6 years ago by openlayers

Example configurations:

This configuration will result in a request url being constructed by OpenLayers that includes the TRANSPARENT parameter. However, the case of the value "true" is incorrect.

var sst = new OpenLayers.Layer.WMS( "AMSRE SST",

" http://localhost:8080/wms/wms",

{layers: "AMSRE_SST_M", transparent: "true", format:'image/png'} );


This configuration uses the correct case. However, the url constructed by OpenLayers does not include the TRANSPARENT parameter.

var sst = new OpenLayers.Layer.WMS( "AMSRE SST",

" http://localhost:8080/wms/wms",

{layers: "AMSRE_SST_M", transparent: "TRUE", format:'image/png'} );

Changed 6 years ago by openlayers

  • milestone set to 2.5 Release

Changed 6 years ago by penyaskito

I think it should be better to use the toLowerCase function.

Changed 6 years ago by sderle

compromise... can't use toLowerCase easily because the value might be boolean, not string

Changed 6 years ago by sderle

  • keywords review added; transparent removed

Changed 6 years ago by euzuro

taking sde's patch and applying the same logic to WMS/Untiled. Goodness knows that it is embarrassing and wrong the way those two classes are the same and yet different. but those are the breaks right now. anyways. i've also augmented the wms layer's tests (not those of untiled because there *are* no those of untiled). alas alas. sigh

Changed 6 years ago by sderle

  • keywords commit added; review removed

TESTS?! what what?! go ahead and commit

Changed 6 years ago by euzuro

  • status changed from new to closed
  • resolution set to fixed

fixed with r3290 -- thanks to kablukiw for finding/reporting this, sde for making the patch and reviewing my updated one :-)

Changed 6 years ago by euzuro

  • keywords commit removed
Note: See TracTickets for help on using tickets.