The HTTP spec section 14.1 states:
"If no Accept header field is present, then it is assumed that the
client accepts all media types. 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."

So I'm wondering if from within the handle() method in a Restlet if
the following code should return null:

  request.getClientInfo().getPreferredVariant(variants,
this.getApplication().getMetadataService());

if a client's request does not include one of the variants in the
variants List, so that a server can detect the situation and return
406. Right now it seems to return the first variant in the variant
list.

Thanks,

Dave

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

Reply via email to