Skip to content

Conversation

Tratcher
Copy link
Member

#10886 Adding IHttpResponseCompletionFeature.CompleteAsync for HTTP/2 only.

  • Allows for the graceful completion of a response message (from the client's perspective) without waiting for the request delegate to unwind.
  • It makes sure all remaining response headers, data, and trailers are sent before it returns.
  • It may throw if the response is in an invalid state such as a Content-Length mismatch.
  • RequestAborted will not fire after this completes. Abort can still be used though.

Retrofitting this for HTTP/1.1 shouldn't be hard but I wanted to unblock the gRPC scenarios first.

While testing this I fixed a bug in response trailers where they were not getting cleared if the app threw an exception and the server converted it to a 500 response. You'd end up with a 500 + trailers.

@Tratcher Tratcher added this to the 3.0.0-preview7 milestone Jun 13, 2019
@Tratcher Tratcher requested review from JamesNK and halter73 June 13, 2019 21:29
@Tratcher Tratcher self-assigned this Jun 13, 2019
@Tratcher Tratcher requested a review from halter73 June 13, 2019 22:39
@Tratcher Tratcher force-pushed the tratcher/complete branch from c41294b to 8ca6917 Compare June 14, 2019 22:12
@Tratcher Tratcher merged commit bc5bee7 into master Jun 15, 2019
@Tratcher Tratcher deleted the tratcher/complete branch June 15, 2019 16:01
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants