Bug #2526
Parameters retrieved incorrectly in CNResourceHandler
100%
Description
in edu.ucsb.nceas.metacat.restservice.CNResourceHandler there are two ways in which serialVersion is accessed from HTTP PUT operations. In setReplicationPolicy and updateReplicationMetadata the serialVersion is accessed by the call:
serialVersionStr = multipartparams.get("serialVersion").get(0);
This manner appears to work with the way that libClient is encoding the request body.
In the following methods- owner, setAccess, setObsoletedBy, deleteReplica- the serialVersion is accessed by the call:
serialVersionStr = params.get("serialVersion")[0];
This manner does not work with the way the libClient is encoding the request body.
I also noted that other multipart params are accessed incorrectly.
Related issues
History
#1 Updated by Andrew Pippin over 12 years ago
https://cn-dev-3.dataone.org/cn/v1/accessRules (CNAuthorization.setAccessPolicy()) is using the queryString to get the serialVersion instead of pulling it out of the MMP (See: #2528)
#2 Updated by Chris Jones over 12 years ago
- Status changed from New to Closed
I've modified CNResourceHandler's deleteReplica(), owner(), reserve(), and setObsoletedBy() methods to use params from the MMP entities. This should resolve outstanding param issues.