-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Should support both SPACE and HTAB as whitespace #13
Comments
Hello, and thank you for your issue. This module is not made to follow the parsing rules of the HTTP content-typr header, just the RFC that is outlined in the readme. |
I will look to see if RFC 6838 allows tabs or not as well, though I gotta run some errands, but if you find so I can definitely reopen or I will if I find it does. |
Hi, Thanks for reviewing the issue, and sorry for not replying before. I checked the issue on the phone and it seemed I couldn't reply to a closed one. But from desktop I can :D I understand the motivation to close the issue, and I will not reopen it. I am only commenting to bring your attention to jshttp/type-is#52. I moved the issue there because |
Currently, the
parse
function can parse media types surrounded by whitespaces, but not tabs:However, I believe
HTAB
should be a valid whitespace character in the context ofContent-Type
header parsing. The specification for the Content-Type header (https://www.rfc-editor.org/rfc/rfc9110#field.content-type) states that:And section 5.6.6 defines the semicolon-delimited parameters as:
Where
OWS
is defined in section 5.6.3 as:So the media-type might be followed by
HTAB
s in a validContent-Type
header. If the parser function supports trailing spaces, it should as well support trailing tabs.The text was updated successfully, but these errors were encountered: