MIME Type Reference
Extension in, Content-Type out. Includes the charset parameter where it matters.
Matches
—
Matches
—
Worked example
Serving an SVG as text/plain stops it rendering in an <img> tag. Serving it as image/svg+xml renders it — and also allows embedded scripts when opened directly, which is why SVG uploads need sanitising.
The Content-Type header tells the client how to interpret bytes. Browsers sniff when it is missing or wrong, but never for scripts, and modern browsers refuse to execute a script served with the wrong type at all.
Two parameters that matter
charset for text types, and boundary for multipart. Omitting the charset makes non-ASCII content depend on browser defaults, which is how mojibake happens. application/octet-stream means "unknown binary" and forces a download rather than a render.