Unidata / thredds

THREDDS Data Server v4.6
https://www.unidata.ucar.edu/software/tds/v4.6/index.html
265 stars 179 forks source link

trimDirectiveWhitespaces breaking GetTransect #1366

Open markhepburn opened 3 years ago

markhepburn commented 3 years ago

The GetTransect implementation outputs coordinates as space-separated coordinates: https://github.com/Unidata/thredds/blob/4.6.x/tds/src/main/webapp/WEB-INF/jsp/wms/showTransect_xml.jsp#L33

The included xml_header adds the trimWhitespaceDirectives attribute, which has the effect of removing the space between the two numbers. Changing it to false produces the expected output.

I'm assuming something has changed, perhaps jasper treating expression-language statements as directives. I'm using:

lesserwhirls commented 3 years ago

@ethanrd - thoughts?

markhepburn commented 3 years ago

(Just weighing in so you don't think I've dropped this and run -- I do have plans to do try older versions of tomcat, if not an informal bisection. I'm obviously happy if someone can save me the trouble though :))

markhepburn commented 3 years ago

Having another quick look at this, and same issue with Tomcat 8.5.70.

I also just tried on a random public thredds server with the same result.

I'm happy to create a PR that removes the trimDirectiveWhitespaces, but it seems odd that this hasn't been detected up until now! (I get that it is non-standard functionality, and possibly not broadly used). Presumably at some point it was working, and I'm assuming something external changed in order to break it.