Subject: [ogpx] content negotiation for LLSD messages with HTTP transport binding

From: Meadhbh Hamrick <[email-masked]>
Date: Mon, 29 Mar 2010 09:30:03 -0700

so that last message reminds me.

last year there was a little bit of consternation about content
negotiation for LLSD. it was hypothesized that there might be a
service or client that did not produce (or consume) all of the defined
serializations (XML, JSON, Binary). so two questions were asked:

a. how does a client signal it's serialization preference?
b. how does a server signal that it can't conform to the client's
serialization preference?

fortunately, we have some guidance from the HTTP specs.

1. a client uses the Content-Type: header to specify which
serialization it is using.
2. a client uses the Accept: header to specify which serializations it
can receive in response.
  2.1. note that clients can list multiple serializations with an Accept: header
  2.2. if an Accept: header is not present in the request, the default
of */* is assumed.
3. if the server is not capable of generating a response using the
serialization specified in the request's Accept: header,
  3.1. the sever responds with a 406 Not Acceptable response.
4. if the server IS capable of generating a response using the
serialization specified in the request's Accept: header,
  4.1. the response is generated and the Content-Type: header is used
to specify the serialization used.

i think that pixel and i agreed this is what we were going to do
moving forward. (pix? do you remember if we used 406 or 415?)

so anyway, this is what i'm going to code up.

-cheers
-meadhbh
--
meadhbh hamrick * it's pronounced "maeve"
@OhMeadhbh * http://meadhbh.org/ * [email-masked]