Skip to content

Need for Request to take a slice of MaybeUninit<Header> #95

Closed
@Soveu

Description

@Soveu

Context: hyper passes uninitialized array of httparse::Header to Request::new.
This is undefined behavior and I discovered it while working on Replacing mem::uninitialized with MaybeUninit

I acknowledge that changing headers field will be a breaking change, because it is public, so
is there a chance that a Request type copy could be implemented, but with headers: &mut [MaybeUninit<Header>]?

EDIT: I just realized that author of httparse is also author of hyper 😅

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions