[Geoserver-devel] [JIRA] (GEOS-7365) AcceptLanguages is correctly recognized as a WCS 2.0 parameter, but any value given results in an error

James @ BGS created an issue

GeoServer / BugGEOS-7365

AcceptLanguages is correctly recognized as a WCS 2.0 parameter, but any value given results in an error

Issue Type:

BugBug

Assignee:

Unassigned

Components:

WCS

Created:

06/Jan/16 1:54 PM

Labels:

WCS INSPIRE OWS-COMMON-2

Priority:

MediumMedium

Reporter:

James @ BGS

As posed on the geoserver-user list on 15/12/2015.

When I send a WCS GetCapabilities request adding the AcceptLanguages parameter for example as below:

WCS request with AcceptLanguages

I get an Exception report for an InvalidParameterValue

> Failed to set property ACCEPTLANGUAGES in request object using value * of type class java.lang.String java.lang.String cannot be cast to net.opengis.ows20.AcceptLanguagesType

However * is a valid parameter value, as are one or more RFC 4646 character (language) codes.

OWS common (OGC 06-121r9) tells us that if the acceptlanguages parameter is not supported then the service can decide which human readable language it returns, otherwise when it is supported it shall return the best-available language according to the users preference. If the service doesn’t support any of the languages requested by a user, but the request includes a * then the server may return a language of its choice, otherwise it shall return an error…

Note the parameter is valid for all WCS requests not just GetCapabilities.

As languages support isn’t yet available for any GeoServer OGC service, I guess the simplest solution would be to treat the acceptlanguages parameter as not known and ignore it.

A nicer touch would be to allow the * parameter or return an error.

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v7.1.0-OD-03-049#71001-sha1:c7b15e5)

Atlassian logo