I see.

I can think of two options:

1.) Instead of sending a PUT to
/resource1/{r1_identifier}/resource2/{r2_identifier}, you could try
sending a PUT to /resource1/{r1_identifier}/resource2/ with
{r2_identifier} as the entity body?

2.) Send a default entity body so the request goes through.

My interpretation of the spec is that an entity is required for a PUT

On Jan 14, 2008 10:14 AM, Rhett Sutphin <[EMAIL PROTECTED]> wrote:
> 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
>

Reply via email to