- From: Nathan <nathan@webr3.org>
- Date: Wed, 10 Feb 2010 19:26:16 +0000
- To: Richard Cyganiak <richard@cyganiak.de>
- CC: public-lod@w3.org
Richard Cyganiak wrote: > Hi Nathan, > > On 10 Feb 2010, at 17:26, Nathan wrote: >> interested to here more opinions on the "*may* also just send a default >> representation back to the client. That's because the Accept header is >> just a statement of preference by the client" comment though; because >> obviously if people did this for dereferenced URIs and just fired back a >> generic html page regardless (or worse) then the whole linked data thing >> would fall apart (surely)? > > Well, let's turn this around and look at it from an RDF client's point > of view. I send an Accept header asking for RDF/XML. But for 99% of the > URIs out there, the server fires back HTML regardless. > > Content negotiation is an *optional* feature of HTTP. Conformant clients > and servers don't have to implement it. The vast majority of servers don't. > >> I'd always taken the meaning of sentences in the http 1.1 rfc like: >> "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." >> http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1 >> to mean that's what you should do, not "you may do whatever you want" > > It's what you *should* do, but not what you *must* do, hence conformant > servers can elect not to do so, and conformant clients have to > anticipate that behaviour. > > Anyway, this describes *only* the case where it has already been > established that the server has nothing that the client understands, > hence no useful conversation can take place. This is not a particularly > interesting case, and I'm not sure why you put so much weight on it. nor I! :) > From the client's POV, what's the difference between receiving a 406 (“I > don't have a format that you understand”) and a 200 with a non-supported > Content-Type (“Here, take a look at this thing in a format that you > don't understand”)? > Ambiguity? a 4xx is a clear definate answer which can't be miss-read, and a 2xx indicates that you're giving back what the client asked for, which you aren't. I pretty much equate it with asking for a pair of red socks and getting a response of "certainly sir" followed by some Y-fronts. regards!
Received on Wednesday, 10 February 2010 19:26:59 UTC