Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protocol examples should use comma separated headers in examples #333

Closed
azaroth42 opened this issue Jul 29, 2016 · 5 comments · Fixed by #338
Closed

Protocol examples should use comma separated headers in examples #333

azaroth42 opened this issue Jul 29, 2016 · 5 comments · Fixed by #338
Assignees
Milestone

Comments

@azaroth42
Copy link
Collaborator

azaroth42 commented Jul 29, 2016

Given that many implementations use a dictionary approach to sending and receiving headers, having multiple headers with the same name will result in data loss, compared to using comma separated values in a single header.

For example the link headers: https://www.w3.org/TR/annotation-protocol/#responses-without-annotations

Plus add a note explaining the rationale.

Discussed: http://www.w3.org/2016/07/29-annotation-irc#T15-45-55

@BigBlueHat
Copy link
Member

@azaroth42 thoughts?
a6b358e

@azaroth42
Copy link
Collaborator Author

Looks good. I might combine the second and third paragraphs?

@BigBlueHat
Copy link
Member

So...we have a new problem...from RFC 7230 (bottom of page 5):

   To avoid any possible ambiguity, individual preference tokens SHOULD
   NOT appear multiple times within a single request.  If any preference
   is specified more than once, only the first instance is to be
   considered.  All subsequent occurrences SHOULD be ignored without
   signaling an error or otherwise altering the processing of the
   request.  This is the only case in which the ordering of preferences
   within a request is considered to be significant.

If I'm reading that correctly, the way we're using Prefer doesn't work...as the last value "wins" meaning the server can't really use them both together. (Proposal for fixing forthcoming).

@BigBlueHat
Copy link
Member

BigBlueHat commented Aug 2, 2016

So I had this wonderful proposal for fixing this, but just found that it looks like LDP just provides multiple include values as space delimited IRIs:

From: https://www.w3.org/TR/ldp/#prefer-examples-direct-membershiponly

Clients interested only in information about the container (for example, which membership predicate it uses) and its membership might use this hint on a GET request: Prefer: return=representation; include="http://www.w3.org/ns/ldp#PreferMembership http://www.w3.org/ns/ldp#PreferMinimalContainer".

include is not (as yet) a registered preference, so perhaps we'll need more information added to my note commit that explains its usage. And perhaps we should help LDP (or whoever) get include registered.

Thoughts?

@BigBlueHat
Copy link
Member

Here's the LDP-level definition of the include parameter for Prefer:
https://www.w3.org/TR/ldp/#h-prefer-include

BigBlueHat added a commit that referenced this issue Aug 3, 2016
LDP defines `include` as a space separated list of identifiers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants