Provide fast content type string parsing for: - Content-Type - Accept
Note:
- This is not fully implementation of Content Negotiation
- This is not an accurate validator of content-type or accept string
- The aim is to do a really fast triage on detecting MIME type based on the fact that 99% of case user agent sent out the correct string and we only aim to detect the commonly used types:
- text/html
- text/css
- text/csv
- text/plain
- text/yaml
- text/x-yaml
- text/vnd.yaml
- text/xml
- text/javascript
- application/json
- application/javascript
- application/xml
- application/pdf
- application/yaml
- application/x-yaml
- application/vnd.yaml
- application/vnd.ms-word
- application/vnd.ms-excel
- application/vnd.openxmlformats-officedocument.wordprocessingml.document
- application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
- image/png
- image/gif
- image/jpeg
- image/svg+xml
- image/bmp
- image/ico
- video/mp4
- video/mpeg
- video/mov
- video/ogg
- video/x-flv For all other mimetype it returns UNKNOWN directly
Refer: - List of default Accept values