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

isMimeType: is not matching valid MIME types with an underscore #2119

Closed
pano9000 opened this issue Dec 6, 2022 · 2 comments · Fixed by #2120
Closed

isMimeType: is not matching valid MIME types with an underscore #2119

pano9000 opened this issue Dec 6, 2022 · 2 comments · Fixed by #2120

Comments

@pano9000
Copy link
Contributor

pano9000 commented Dec 6, 2022

Describe the bug
isMimeType is not matching valid MIME types that have an underscore in their name.

Examples

  • audio/ip-mr_v2.5
  • application/media_control+xml
    are valid MIME types, but currently isMimeType will return false

Full original IANA List of MIME Types can be found here, or take a look at the "extracted" list I created out of it, with just the MIME types to make it easier to copy/paste and test:
https://gist.github.com/pano9000/87919bee80b4fbc14b8b29a7dc9878cd

A PR to fix this will follow soon

pano9000 added a commit to pano9000/validator.js that referenced this issue Dec 6, 2022
pano9000 added a commit to pano9000/validator.js that referenced this issue Dec 6, 2022
fixes a few valid MIME types not getting matched

fixes validatorjs#2119
@WikiRik
Copy link
Member

WikiRik commented Dec 6, 2022

Did you test out the entire list with this repo? Maybe there are some other issues with it

@pano9000
Copy link
Contributor Author

pano9000 commented Dec 6, 2022

yes, while I was at it, I did run a complete test as well:
It was just the ones with the underscore, that failed.

pano9000 added a commit to pano9000/validator.js that referenced this issue Jan 28, 2023
pano9000 added a commit to pano9000/validator.js that referenced this issue Jan 28, 2023
fixes a few valid MIME types not getting matched

fixes validatorjs#2119
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