Refactor LanguageServerCodec for clarity and succinctness using recursion.
Rename ParseError::Httparse to Headers, directly describing which part of the message failed to parse.
Fixed
Fix decoding chunked message bodies and add a unit test to enforce this invariant.
Enforce correct charset values for Content-Type header, if specified, as per the official spec. In this case, that means requiring utf-8 (or utf8 for backwards compatibility).
Add missing branch to Error::source() method implementation for ParseError.
Changed
LanguageServerCodec
for clarity and succinctness using recursion.ParseError::Httparse
toHeaders
, directly describing which part of the message failed to parse.Fixed
charset
values forContent-Type
header, if specified, as per the official spec. In this case, that means requiringutf-8
(orutf8
for backwards compatibility).Error::source()
method implementation forParseError
.Follow-up to #316.
Fixes #318.