Representation rep = getResponse.getEntity();
if (contentType!=null) {
rep.setMediaType(contentType);
}
putRequest.setEntity(rep);
Response putResponse = targetClient.handle(putRequest);
if (!putResponse.getStatus().isSuccess()) {
log.severe("Cannot put media update to "+targetLocation+", status="+putResponse.getStatus().getCode());
}
} else {
if (!getResponse.getStatus().isSuccess()) {