lightmy.day

HTTP headers

Content-Disposition HTTP Header Meaning

Content-Disposition hints whether content should display inline or download as a file.

Meaning

The server is giving presentation and filename instructions for the response body.

Where it appears

File downloads, generated reports, and attachments commonly use it.

What to check

Check filename encoding, attachment behavior, and whether user-controlled filenames are safely sanitized.

Example

Content-Disposition: attachment; filename="report.pdf"

Common values and directives

inline
The browser may display the content inside the page or tab.
attachment
The browser should treat the response as a download.
filename
filename="report.pdf"Suggests a filename for the downloaded attachment.

References

Related HTTP headers

Related HTTP status codes