Skip to content

Avoid cloning headers in multer::Field #2337

@davidpdrsn

Description

@davidpdrsn

multer still uses http 0.2 which required us to eagerly convert the headers in multer::Field to an http 1.0 HeaderMap.

A PR to update multer to http 1.0 has been merged but not yet published. When its published we can update https://github.com/tokio-rs/axum/blob/main/axum/src/extract/multipart.rs#L98-L103 and https://github.com/tokio-rs/axum/blob/main/axum-extra/src/extract/multipart.rs#L118-L128 to just reuse the headers in the field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-axumA-axum-extraC-cleanupCategory: PRs that clean code up or issues documenting cleanup.S-blockedStatus: marked as blocked ❌ on something else such as a PR or other implementation work.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions