Uploaded image for project: 'GeoServer'
  1. GEOS-8300

REST GET resource metadata - file extension can override format parameter

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2.12-beta
    • Fix Version/s: 2.12-RC1
    • Component/s: REST
    • Labels:
      None

      Description

      If you make a REST GET request for resource metadata against a resource with a filename that includes an extension that is among the supported configuration formats (xml, html, json), then the filename of the resource will determine the content of the response rather than the format parameter.

      For example, the request:

      http://localhost:8080/geoserver/rest/resource/styles/point.xml?operation=METADATA&format=json
      

      Will return metadata about the resource point.xml in XML format with content-type=application/json

      However, the request

      http://localhost:8080/geoserver/rest/resource/styles/point.sld?operation=METADATA&format=json
      

      Will return metadata about the resource point.sld in JSON format, since sld is not a configuration format.

        Attachments

          Activity

            People

            • Assignee:
              tbarsballe Torben Barsballe
              Reporter:
              tbarsballe Torben Barsballe
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: