[Geoserver-devel] [JIRA] (GEOS-7157) Importer REST API treats bad content-type as an empty request

Torben Barsballe created an issue

GeoServer / BugGEOS-7157

Importer REST API treats bad content-type as an empty request

Issue Type:

BugBug

Assignee:

Unassigned

Components:

Importer

Created:

14/Aug/15 11:49 PM

Priority:

MediumMedium

Reporter:

Torben Barsballe

When using the Importer REST API to import data, some strange behaviour occurs when using the wrong content-type.

If I POST an empty object:

{}  

to .../gepserver/rest/imports with the (valid) content type application/json I get back an HTTP 500 error. If I change the content type to anything other than application/json (eg. application/json; charset=UTF-8, foobar, etc.) I get back an HTTP 201 Created. The response contains a new ID, is in the state PENDING, and has zero tasks in the tasks array.

Furthermore, when formulating a valid request and using content-type application/json; charset=UTF-8, it produces the same response as with an invalid request – newly generated ID, pending status, and no tasks.

When making a valid request using the content-type applicaition-json, the api behaves as expected.

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v6.5-OD-08-001#65007-sha1:1fc9846)

Atlassian logo