#http2 #mime #http

content_disposition

Content-Disposition parser

4 releases (breaking)

0.4.0 Aug 16, 2024
0.3.0 Aug 16, 2024
0.2.0 Aug 16, 2024
0.1.0 Aug 16, 2024

#35 in #http2

Download history 3512/week @ 2025-10-23 5109/week @ 2025-10-30 6179/week @ 2025-11-06 5465/week @ 2025-11-13 5946/week @ 2025-11-20 5944/week @ 2025-11-27 8428/week @ 2025-12-04 10032/week @ 2025-12-11 8380/week @ 2025-12-18 9195/week @ 2025-12-25 7137/week @ 2026-01-01 11167/week @ 2026-01-08 11094/week @ 2026-01-15 10944/week @ 2026-01-22 15814/week @ 2026-01-29 14436/week @ 2026-02-05

54,050 downloads per month
Used in 34 crates (4 directly)

MIT OR 0BSD

15KB
226 lines

Content-Disposition

Crate

Documentation

See the rustdoc at docs.rs.

API

The primary entry point for this library is the following function:

    fn parse_content_disposition(header: &str) -> ParsedContentDisposition

Example

    let dis = parse_content_disposition(" form-data; name=\"cover\"; filename=\"exif.jpg\"");

    assert_eq!(dis.disposition, DispositionType::FormData);
    assert_eq!(dis.name(), Some("cover".to_string()));
    assert_eq!(dis.filename(), Some("exif.jpg".to_string()));

MSRV policy

Currently the minimum supported Rust version (MSRV) is 1.51.0. MSRV increases will be kept to a minimum, and will always be accompanied with a minor version bump.

Dependencies

~3.5MB
~125K SLoC