Uploading of SLD from GeoNode fails

Description

When using GeoNode 2.10rc5 to upload a layer to GeoServer 2.15.2 it results in GeoServer reporting the error

In GeoNode the python package used to upload the data to GeoServer is called gsconfig.

Tested with GeoServer 2.15.1 and the same error is returned. Testing with an older nightly build of GeoServer 2.15.1 from a couple of weeks ago works fine. No code has changed in GeoServer in this area and also in gsconfig.

As per the (GeoServer API documentation) the POST /styles REST endpoint it passes the following:

gsconfig when passing making this call passes the following data in the header:

The problem is the Accept header item, if it is omitted the correct method is called :

If the Accept header is present then it calls

The reason this happens is because the `produces` list is not expecting application/xml. I assume an underlying xml library has updated.

and should be:

This fix ensures that it is backwards compatible.

Environment

Ubuntu 18.04 GeoServer 2.15.2

Status

Assignee

Unassigned

Reporter

Robert Ward

Triage

Fix versions

None

Affects versions

Components

Priority

High
Configure