Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pipeline handler: fix error state tracking #595

Merged
merged 1 commit into from
Aug 27, 2018

Commits on Aug 27, 2018

  1. pipeline handler: fix error state tracking

    Motivation:
    
    @pushkarnk hit an interesting edge case that we previously mishandled
    and crashed. All these conditions need to be true
    
    1. Whilst have an ongoing request (ie. outstanding response), ...
    2. ... a `HTTPParserError` arrives (which we correctly queue)
    3. Later the outstanding response is completed and then ...
    4. ... the `HTTPServerProtocolErrorHandler` sends a .badRequest response
    
    We previously crashed. The reason we crashed is that the
    `HTTPServerPipelineHandler` obviously tracks state and then asserts that
    no response is sent for a wrong request. It does have an affordance to
    allow a .badRequest response for a request it couldn't parse. However
    this state tracking wasn't done if the error itself was enqueued for
    later delivery.
    
    Thanks very much @pushkarnk for the report!
    
    Modifications:
    
    instead of delivering the error directly use the `deliverOneError`
    function which transitions the state correctly.
    
    Result:
    
    fewer crashes & hopefully happy Pushkar
    weissi authored and Johannes Weiß committed Aug 27, 2018
    Configuration menu
    Copy the full SHA
    8508e00 View commit details
    Browse the repository at this point in the history