MIME Type

API Testing

// Definition

A label (e.g. application/json, image/png, text/csv) that declares the format of a file or HTTP body, carried in the Content-Type header. Testing concerns include: mismatches between the declared type and actual content (a server returning HTML with Content-Type: application/json), frontend code that trusts the extension rather than the declared type, and upload endpoints that validate MIME type purely client-side — allowing an attacker to spoof it. Test by sending requests with mismatched Content-Type headers and verify the server rejects or handles them safely.

// Related terms