-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
HTTP: consider quoted charset #6354
HTTP: consider quoted charset #6354
Conversation
Do we also want to allow single quotes ( |
I'm not sure single quotes are allowed, but if others agree I can add it to this PR. |
No, single quotes should not be interpreted as string delimiters, see definition of |
Don't a lot of HTTP headers have the standard |
I'm not talking about mime types - i'm talking about the generic HTTP header value syntax. We already need this for here and thats nothing to do with mime types. The syntax dates from the email header days. |
And despite any of this, it's still true that Crystal needs a proper parser implementation. |
My bad, that was mime types; i'm a bit tired. I meant that mime types, set-cookie, and content-disposition have the same approximate header syntax with one or more initial values then the same |
As far as I know, this is called mime type, despite the fact that applications like |
I've never seen it named as such and I can't imagine it being called that since it would be so confusing. "mime type" already means a specific concrete RFC and concept. |
Sry, I meant media type. Doesn't make any difference, though. I guess it's just that this concept initially comes from mime type declarations and was adopted for other uses as well, without there being a proper name for this syntax. Implementation wise, it is typically named a MIME media type parser. This implementation can be applied to non-MIME contexts such as |
I'd never find such a parser as a user if I had to think "mime". So I think we shouldn't name it that way. It should be in the generic |
Merging the fix. Discussion feels unrelated or that it could come later. |
Yep, discussion was unrelated, sorry. |
Fixes #6353