Re: [dxwg] Define conneg interaction with media types that have a profile param

Yes, sorry -- `Accept-Profile` (I always get it round the wrong way, as the document's URL has accept-schema in it ... twice! Edited the issue text to fix this.

The issue is that there needs to be a rule to determine the precedence between the HTTP headers that can carry the same information. Within a single header, `q` values can be used. The multiple protocol issue becomes even more complex. 

There are four options that I can see:

* It is a client error to send both Accept and Accept-Profile, when the Accept header contains items that have a `profile` media type parameter or functional equivalent.  I don't think this is the way to go, as there are existing systems that rely on (e.g.) json-ld's profile parameter to request particular syntaxes (flattened vs expanded, web-annotation versus activity-streams). If there was another syntax (e.g. turtle) that did not have a `profile` parameter, it would be impossible to ask for one of JSON-LD with the profile (in Accept) or Turtle (in Accept) with the same profile (in Accept-Profile).
* The Accept-Profile header takes precedence.  This is good for forwards compatibility. The new thing overrules the old thing, that existed before we had this capability.
* The Accept header takes precedence. This is good for backwards compatibility. The old thing is well established and in use, the new thing should layer on top of it but not break it.
* Precedence is explicitly defined by the server.   This would make sense as the conneg algorithm is already [server-specific](http://httpd.apache.org/docs/2.4/en/content-negotiation.html#algorithm). It is, however, bad for interoperability as the results between systems can be very dissimilar in the presence of the same information. I don't think this is the right way to go, as it's not about weighting of various options, it's about resolving an explicit conflict.

My personal opinion (not speaking as chair of or on behalf of the JSON-LD WG) is that Accept should take precedence as breaking existing systems is to be avoided whenever possible.


-- 
GitHub Notification of comment by azaroth42
Please view or discuss this issue at https://github.com/w3c/dxwg/issues/261#issuecomment-400008785 using your GitHub account

Received on Monday, 25 June 2018 16:14:04 UTC