Hi Kevin,
On Jan 14, 2008, at 8:38 AM, Kevin Conaway wrote:
Are you overriding allowPut() in your Resource class? You need to
do as such:
@Override
public boolean allowPut() {
return true;
}
I should have been more clear -- the scheme I described works fine if
there's an entity provided to the PUT. Any entity at all will do -- I
have the Resource#storeRepresentation implementation just ignore it.
The specific code which returns 400 for empty entities is in
Resource#handlePut (starting at line 567 in 1.1-M1):
if (canPut) {
if (getRequest().isEntityAvailable()) {
put(getRequest().getEntity());
// HTTP spec says that PUT may return
// the list of allowed methods
updateAllowedMethods();
} else {
getResponse().setStatus(
new Status(Status.CLIENT_ERROR_BAD_REQUEST,
"Missing request entity"));
}
}
Thanks,
Rhett