• Harris Hancock's avatar
    Report raw HTTP content when handling client protocol errors in kj-http · 350b2f2b
    Harris Hancock authored
    This information is typically necessary to debug such protocol errors. However, it requires special handling, since it could contain sensitive information.
    
    The code which has the best view on protocol errors is HttpHeaders::tryParseRequest(), which previously returned an empty Maybe<Request> on failure. This commit changes that function to return a OneOf<Request, ProtocolError>. This required some surgery in various other parts of the code to deal with the OneOf.
    350b2f2b
http.c++ 179 KB