[Geoserver-devel] [JIRA] (GEOS-8138) StyleFinder overwrites general MediaType mappings when a StyleHandler has a conflicting fileExtension

Matt Kruszewski created an issue

GeoServer / BugGEOS-8138

StyleFinder overwrites general MediaType mappings when a StyleHandler has a conflicting fileExtension

Issue Type:

BugBug

Assignee:

Unassigned

Created:

11/May/17 11:41 PM

Priority:

MediumMedium

Reporter:

Matt Kruszewski

If a custom StyleHandler uses a common file extension (e.g., “style.json”), the StyleFinder will overwrite the MediaType mapping for that extension with the mime type of the custom StyleHandler.

For example, when using the community MBStyleHandler (which uses the “json” file extension), the MediaTypes mapping from the “.json” extension to the “application/json” mime type is overwritten with “application/vnd.geoserver.mbstyle+json”.

As a result, any style-related request that uses the “.json” extension would return incorrectly (e.g., even /styles/someSLDStyle.json – or simply /styles.json).

Here is the relevant code in StyleFinder

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v1000.929.2#100040-sha1:94c1764)

Atlassian logo