Updating a coveragestore via REST returns 201 rather than 200

Description

When I update an existing coverage store, I expect a PUT to return a 200 response as described in the API documentation :
Instead, the REST service returns a 201 response.

First, I create a coveragestore via POST. 201 response is as expected.

$ curl -v -XPOST --basic --user admin:geoserver -H 'Content-Type: application/xml' -d '<coverageStore><name>radar_sample</name><workspace>leads</workspace><enabled>true</enabled></coverageStore>' http://localhost:8080/geoserver/rest/workspaces/leads/coveragestores - http://localhost:8080/geoserver/rest/workspaces/leads/coveragestores

  • About to connect() to localhost port 8080 (#0)
    * Trying ::1... Connection refused
    * Trying fe80::1... Connection refused
    * Trying 127.0.0.1... connected
    * Connected to localhost (127.0.0.1) port 8080 (#0)
    * Server auth using Basic with user 'admin'
    > POST /geoserver/rest/workspaces/leads/coveragestores HTTP/1.1
    > Authorization: Basic YWRtaW46Z2Vvc2VydmVy
    > User-Agent: curl/7.20.0 (i386-apple-darwin9.8.0) libcurl/7.20.0 OpenSSL/0.9.8n zlib/1.2.4 libidn/1.16
    > Host: localhost:8080
    &gt; Accept: <b>/</b>
    &gt; Content-Type: application/xml
    &gt; Content-Length: 107
    &gt;
    &lt; HTTP/1.1 201 Created
    &lt; Date: Wed, 05 May 2010 20:22:24 GMT
    &lt; Location: http://localhost:8080/geoserver/rest/workspaces/leads/coveragestores/radar_sample - http://localhost:8080/geoserver/rest/workspaces/leads/coveragestores/radar_sample
    &lt; Server: Noelios-Restlet-Engine/1.0..8
    &lt; Transfer-Encoding: chunked
    &lt;
    * Connection #0 to host localhost left intact
    * Closing connection #0

Next... update the coverage store via PUT. Server returns 201 rather than the expected (and documented) 200. This is incorrect since nothing new has been 'created'.

$ curl -v -XPUT --basic --user admin:geoserver -H 'Content-type: text/plain' -d 'file:/Users/alex/radar_sample.tif' http://localhost:8080/geoserver/rest/workspaces/leads/coveragestores/radar_sample/external.geotiff?configure=first&amp;coverageName=radar_sample - http://localhost:8080/geoserver/rest/workspaces/leads/coveragestores/radar_sample/external.geotiff?configure=first\&amp;coverageName=radar_sample

Environment

None

Status

Assignee

Unassigned

Reporter

codehaus

Triage

None

Fix versions

Affects versions

2.0.1

Components

Priority

Medium
Configure