-
Notifications
You must be signed in to change notification settings - Fork 44
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
MIME type parsing, parameter values #40
Labels
Comments
It's worth mentioning here that we'll need quoted values sometimes as you cannot represent ";" otherwise for instance. Given that, I think this data model is good enough. It just complicates a couple consumers in the platform a little as they have to invoke a "get the parameter value" algorithm to get the actual value to operate on. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is probably worth discussing here, if not just to have a reference. Parameter values can be unquoted or quoted. When they're quoted they can contain a couple more characters, such as ";". Inside a quoted value you escape \ and ", by preceding them with a \. You can also escape other code points, but that's a no-op.
The data model I created effectively stores the values as given.
"\g\b\k"
does become"gbk"
, but"\""
stays"\""
.gbk
staysgbk
. This means that you need an algorithm to extract the "raw value".The reason I did this is because browsers currently mostly pass through MIME types, and don't normalize them to all have quoted (or unquoted) parameters. We could decide on something else, but it seems that would be a bigger change from the status quo.
cc @bzbarsky @sleevi @mcmanus
The text was updated successfully, but these errors were encountered: