Allow ExternalGraphics reference in WMS GetCapabilities

Description

WMS GetCapabilities is limited to references to GetLegendGraphics, this request is to the use of other external graphics (specifically any icons or images used in the styles directory):

Note that this request is limited to making use of relative URLs from the styles directory to ensure GeoServer remains responsible for publishing all information cited in the GetCapabilities document.

The image provided here should be rescaled by GetLegendGraphics (rather then generating from SLD).

Environment

None

Activity

Show:
Jody Garnett
January 7, 2016, 12:38 AM

Thanks for testing James, we should get a bit of time to focus on this as part of the release candidate crunch - your testing now sure helps.

Based on the inconsistency in your story (localhost:8080 vs localhost vs 127.0.0.1 I expect the getcapabilities generation is not respect the proxy base url settings.

Torben Barsballe
January 7, 2016, 12:53 AM

This could also just be an issue with SLD and OnlineResource - I notice the link is absolute and not relative (I would expect relative for something in the styles directory)

James @ BGS
January 7, 2016, 9:48 AM
Edited

Certainly it (something) doesn't respect the proxy base url settings, but it appears to be wrong even with respect the local (unproxied) service running on port 8080, the url should be:

http://localhost:8080/geoserv/styles/MyTestMapLegend.jpg

but the actual url given in the GetCapabilites is:

http://localhost:80/geoserv/MyTestMapLegend.jpg

James @ BGS
January 7, 2016, 10:29 AM

I removed the proxy base url from the global settings.

I doubled checked that the edit styles form can see the image when it's placed in the data_dir styles directory (it can) and that the image is browsable as:

http://localhost:8080/geoserv/styles/MyTestMapLegend.jpg

When I look at the GetCapabilities response it gives me:

{{<Style>
<Name>OneG:MyLegend</Name>
<LegendURL width="200" height="681">
<Format>image/jpeg</Format>
<OnlineResource xlink:type="simple" xlink:href="http://localhost:8080/geoserv/MyTestMapLegend.jpg"/>
</LegendURL>
</Style>}}

which is still wrong (the 'styles' folder is missing from the path)

Andrea Aime
February 15, 2017, 11:48 AM

Mass closing all resolved issues not modified in the last 4 weeks

Fixed

Assignee

Torben Barsballe

Reporter

codehaus

Triage

None

Fix versions

Affects versions

Components

Priority

Medium