You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 😅
The text was updated successfully, but these errors were encountered:
Yea, I allow this in hyper knowing that httparse can never look at the values, but it would be better to be explicit about it. It would be a breaking change, that's true. I haven't spent much time thinking about how to fix it in this repo, and instead just promise myself that the slice can never be inspected 🤷
Context:
hyper
passes uninitialized array ofhttparse::Header
toRequest::new
.This is undefined behavior and I discovered it while working on Replacing
mem::uninitialized
withMaybeUninit
I acknowledge that changing
headers
field will be a breaking change, because it is public, sois there a chance that a
Request
type copy could be implemented, but withheaders: &mut [MaybeUninit<Header>]
?EDIT: I just realized that author of
httparse
is also author ofhyper
😅The text was updated successfully, but these errors were encountered: