logo
GeekFormat

Content-Disposition Parser

Content-Disposition Parser

Parse Content-Disposition headers: disposition type, filename, and filename* for internationalized filenames and RFC 5987 encoding.

Parse Summary

Disposition Type
attachment
Effective Filename
report Q2.csv
filename
report.csv
filename*
UTF-8''report%20Q2.csv

Builder

attachment; filename="report.csv"; filename*=UTF-8''report%20Q2.csv

JSON Preview

{
  "type": "attachment",
  "parameters": {
    "filename": "report.csv",
    "filename*": "UTF-8''report%20Q2.csv"
  },
  "effectiveFilename": "report Q2.csv",
  "warnings": []
}

Understand download headers online, fix filename garbling first.

Related

Use Cases

  • Check Content-Disposition details when downloaded files have garbled names or browsers don't preview as expected
  • Use the generator to construct standard Content-Disposition headers when debugging Excel, PDF, and other file export APIs
  • Compare attachment vs inline types when checking browser inline preview vs attachment download behavior differences
  • Verify filename* UTF-8 encoding is correct when validating gateway or CDN passthrough download response headers

Features

  • Download behavior decoded: Preview, download, and filename encoding separated clearly
  • Avoid filename pitfalls: Especially useful for filename and filename* compatibility checks
  • Essential for API debugging: Perfect for export files, attachment downloads, preview links, and gateway passthrough scenarios
  • Clear parsing results: Field breakdown makes it easy to copy to developers or compare against server config

How to Use

  1. 1.Paste Content-Disposition response header content into the parser, or use the generator to configure fields
  2. 2.In parse mode, view disposition type, effectiveFilename, filename, and filename* values
  3. 3.In generate mode, select attachment or inline, enter filename and UTF-8 filename
  4. 4.Copy the generated Content-Disposition content for API debugging or server config comparison

FAQ

Why are download filenames garbled?

The most common cause is incomplete filename encoding, or writing only filename without handling filename*. Breaking down the response header usually pinpoints the issue quickly.

What's the difference between attachment and inline?

attachment typically indicates a file download, while inline favors browser inline preview. Parsing shows the file handling method intuitively, making it easier to troubleshoot download vs preview behavior.

Is this tool suitable for API debugging and file download troubleshooting?

Yes. Especially useful for Excel, PDF, ZIP, and other download APIs, it quickly validates filename, encoding, and response header configuration correctness.

Can it check Chinese filenames and RFC 5987 encoding?

Yes. The tool focuses on identifying differences between filename and filename*, perfect for troubleshooting Chinese filenames, spaces, special characters, and compatibility issues.