Deny leading/trailing whitespace in HeaderValue ( fixes #245 ).
According to rfc7230 http parsers are expected to ignore space around header values. Trying to construct a HeaderValue with leading or trailing whitespace is therefore clearly an error.
I don't know if I agree that extra work should be done to make it an error. I could probably be convinced either way. Maybe @seanmonstar has thoughts on this?
I guess it depends on how the additional checks affect performance. Is it possible to see some benchmark results of before and after?
It's kind of understandable for from_static but sort of a shame to add this on try_from_generic (up-to-date method) since httparse already makes sure that leading and trailing spaces are not part of the header values it parses.