Allow construction of HeaderValue from String
nazar-pc opened this issue · 3 comments
nazar-pc commented
Proposed change
If there is already allocated String
with valid contents, it should be possible to create HeaderValue
without unnecessary re-allocation going through &str
.
Use case
To improve efficiency
Contribution
No response
nazar-pc commented
Funnily enough, FromStr
checks for new lines in HeaderValue
and From<&str>
doesn't. Is that a bug?
paolobarbolini commented
Funnily enough,
FromStr
checks for new lines inHeaderValue
andFrom<&str>
doesn't. Is that a bug?
Jarema commented
Hey!
I will have a run over those validation next week to make them consistent and not affecting perf.
HeaderValue
from String
is ok to add.