You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v3.x: Does the Encoding Object's contentType allow whitespace around commas? #4788
I expected it would (e.g. contentType: text/css, text/javascript, image/*) by analogy with the Accept header, while @ralfhandl read it more literally and expects only contentType: text/css,text/javascript,image/* would be allowed. I suppose it depends on your assumptions on the phrase "comma-separated list" which is all we say about it.
@ralfhandl is there any reason to restrict this? It's supposed to be analogous to Accept, which allows whitespace. Perhaps it is different in German but in English "comma-separated list" usually allows a space. You can see a clear example of this at the very end of §8.6 of RFC9110:
a recipient of a Content-Length header field value consisting of the same decimal value repeated as a comma-separated list (e.g, "Content-Length: 42, 42")
This usage is consistent throughout RFC9110, which I think is a pretty solid precedent. I think we should close this, or at most add a note emphasizing that whitespace is allowed. But really, I think 9110 is the governing precedent here.
Personally I would not interpret "comma-separated list" as allowing whitespace if it was not explicitly stated. But indeed whitespace after commas is common in other places in RFC9110 so it would seem reasonable to allow it.
The best way to resolve this is to provide an ABNF for this field (using definitions established in RFC9110):
Personally I would not interpret "comma-separated list" as allowing whitespace if it was not explicitly stated. But indeed whitespace after commas is common in other places in RFC9110 so it would seem reasonable to allow it.
I personally think that anything that is related to RFC9110 inherently uses its parsing rules because RFC9110 is a normative reference, but if someone feels compelled to write a PR for this, please go ahead. If no one is motivated to write a PR, let's close this.
Activity
handrews commentedon May 12, 2026
@ralfhandl is there any reason to restrict this? It's supposed to be analogous to
Accept, which allows whitespace. Perhaps it is different in German but in English "comma-separated list" usually allows a space. You can see a clear example of this at the very end of §8.6 of RFC9110:This usage is consistent throughout RFC9110, which I think is a pretty solid precedent. I think we should close this, or at most add a note emphasizing that whitespace is allowed. But really, I think 9110 is the governing precedent here.
karenetheridge commentedon May 12, 2026
Personally I would not interpret "comma-separated list" as allowing whitespace if it was not explicitly stated. But indeed whitespace after commas is common in other places in RFC9110 so it would seem reasonable to allow it.
The best way to resolve this is to provide an ABNF for this field (using definitions established in RFC9110):
miqui commentedon May 12, 2026
Same here
handrews commentedon May 12, 2026
I personally think that anything that is related to RFC9110 inherently uses its parsing rules because RFC9110 is a normative reference, but if someone feels compelled to write a PR for this, please go ahead. If no one is motivated to write a PR, let's close this.
include an ABNF for contentType
include an ABNF for contentType
include an ABNF for contentType
include an ABNF for contentType
include an ABNF for contentType
include an ABNF for contentType
include an ABNF for contentType
include an ABNF for contentType
include an ABNF for contentType
include an ABNF for contentType
include an ABNF for contentType (amended) (OAI#5324)