KVP parsing may fail if service or version is not set

Description

So far, I have only observed issues with WFS requests.

Omitting the "service=wfs" parameter from a KVP-encoded request generally works just fine, as long as you are using the applicable virtual service endpoint. However, sometimes it doesn't. All testing is done with a GeoServer 2.10.2 installation with no extensions:

With service=wfs:

http://localhost:8080/geoserver/wfs?service=wfs&request=GetFeature&typenames=sf:roads&version=2.0.0

returns all property values for all features in sf:roads

http://localhost:8080/geoserver/wfs?service=wfs&request=GetFeature&typenames=sf:roads&version=2.0.0&propertyname=

returns all property values for all features in sf:roads

http://localhost:8080/geoserver/wfs?service=wfs&request=GetFeature&typenames=sf:roads&version=2.0.0&propertyname=*

returns all property values for all features in sf:roads

http://localhost:8080/geoserver/wfs?service=wfs&request=GetFeature&typenames=sf:roads&version=2.0.0&propertyname=cat

returns all values for cat property for all features in sf:roads

http://localhost:8080/geoserver/wfs?service=wfs&request=GetFeature&typenames=sf:roads&version=2.0.0&propertyname=cat,label

returns all values for cat and label properties for all features in sf:roads

Without service=wfs:

http://localhost:8080/geoserver/wfs?request=GetFeature&typenames=sf:roads&version=2.0.0

returns all property values for all features in sf:roads

http://localhost:8080/geoserver/wfs?request=GetFeature&typenames=sf:roads&version=2.0.0&propertyname=

http://localhost:8080/geoserver/wfs?request=GetFeature&typenames=sf:roads&version=2.0.0&propertyname=*

http://localhost:8080/geoserver/wfs?request=GetFeature&typenames=sf:roads&version=2.0.0&propertyname=cat

http://localhost:8080/geoserver/wfs?request=GetFeature&typenames=sf:roads&version=2.0.0&propertyname=cat,label

Environment

None

Status

Assignee

Torben Barsballe

Reporter

Torben Barsballe

Triage

None

Fix versions

None

Affects versions

None

Components

Priority

Medium
Configure