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

Implement Http/2 CompleteAsync #11193

Merged
merged 4 commits into from Jun 15, 2019

Conversation

@Tratcher
Copy link
Member

commented Jun 13, 2019

#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 halter73 and JamesNK Jun 13, 2019

@Tratcher Tratcher requested review from anurse and jkotalik as code owners Jun 13, 2019

@Tratcher Tratcher self-assigned this Jun 13, 2019

@Tratcher Tratcher requested a review from halter73 Jun 13, 2019

@Tratcher Tratcher force-pushed the tratcher/complete branch from c41294b to 8ca6917 Jun 14, 2019

@Tratcher Tratcher merged commit bc5bee7 into master Jun 15, 2019

15 of 16 checks passed

AspNetCore-helix-test Build #20190614.35 failed
Details
AspNetCore-ci Build #20190614.39 succeeded
Details
AspNetCore-ci (Build: Linux ARM) Build: Linux ARM succeeded
Details
AspNetCore-ci (Build: Linux ARM64) Build: Linux ARM64 succeeded
Details
AspNetCore-ci (Build: Linux Musl ARM64) Build: Linux Musl ARM64 succeeded
Details
AspNetCore-ci (Build: Linux Musl x64) Build: Linux Musl x64 succeeded
Details
AspNetCore-ci (Build: Linux x64) Build: Linux x64 succeeded
Details
AspNetCore-ci (Build: Windows ARM) Build: Windows ARM succeeded
Details
AspNetCore-ci (Build: Windows x64/x86) Build: Windows x64/x86 succeeded
Details
AspNetCore-ci (Build: macOS) Build: macOS succeeded
Details
AspNetCore-ci (Code check) Code check succeeded
Details
AspNetCore-ci (Test: Templates - Windows Server 2016 x64) Test: Templates - Windows Server 2016 x64 succeeded
Details
AspNetCore-ci (Test: Ubuntu 16.04 x64) Test: Ubuntu 16.04 x64 succeeded
Details
AspNetCore-ci (Test: Windows Server 2016 x64) Test: Windows Server 2016 x64 succeeded
Details
AspNetCore-ci (Test: macOS 10.13) Test: macOS 10.13 succeeded
Details
license/cla All CLA requirements met.
Details

@Tratcher Tratcher deleted the tratcher/complete branch Jun 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.