Importer does not parse the JSON on creation if the json content type contains parameters

Description

Using REST interface of the importer the targetWorkspace configured is not used if I try to import a GeoTiff.

Steps to reproduce (note: curl requests are copied from chrome dev tools)
Create a new import with :

I receive the id of the new import :

Then create a new task uploading a tiff via multipart (note: this request is incomplete because have been copied from the chrome dev tools, for a complete example in curl, use this instructions (http://docs.geoserver.org/latest/en/user/extensions/importer/rest_examples.html#uploading-and-optimizing-a-geotiff-with-ground-control-points) :

and receive the confirmation that the task have been created:

But if I try to get the target details from :
http://localhost:8080/geoserver/rest/imports/35/tasks/0/target

I receive this response

Where MY_DEFAULT_WORKSPACE is the default workspace set in GeoServer.

I tried the same procedure uploading a shape file.
In this case I also change the datastore to the database one

And in this case works:

Environment

None

Status

Assignee

Andrea Aime

Reporter

Lorenzo Natali

Triage

None

Fix versions

Affects versions

Components

Priority

Medium
Configure