Hello Ishaaq,

you're right, the actual content negotiation algorithm is not strict enough.
It does its best to deliver a content, of any kind.
There is an issue for that point:
http://restlet.tigris.org/issues/show_bug.cgi?id=964.
As a workaround, you can add a filter that checks the media type of the
negotiated entity, and the client preferences.

Best regards,
Thierry Boileau



> "If an Accept header field is present, and if the server cannot send a
>> response which is acceptable according to the combined Accept field value,
>> then the server SHOULD send a 406 (not acceptable) response"
>>
>
> ... I guess you *could* argue that this is not a bug as the word SHOULD
> above (http://tools.ietf.org/html/rfc2119#section-3) does give
> implementers some leeway to ignore the above sentence. However, it still
> seems to violate the principle of least surprise IMO.
>
> Ishaaq
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2722475

Reply via email to