httparse icon indicating copy to clipboard operation
httparse copied to clipboard

Improve error message on invalid request start-line

Open Chris-Barrett-FW opened this issue 5 years ago • 0 comments

If the HTTP message begins with whitespace, the resulting error is "invalid HTTP version". This felt misleading, or at least less helpful than it could be, since the version (HTTP/1.1) in the start-line was fine. If the message could instead either, ideally call out leading whitespace (as it may be subtle to spot), or at least instead say something like "invalid start-line", or "doesn't match HTTP format", or similar, I think it could help save people some time in tracking down this particular issue.

Chris-Barrett-FW avatar Oct 20 '20 21:10 Chris-Barrett-FW