-
Notifications
You must be signed in to change notification settings - Fork 10.3k
TestServer needs a IHttpResponseStart feature to avoid flushing #7780
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
Comments
So a few questions:
I agree that having inconsistent behavior based on if the feature is implemented isn't great. Maybe we should throw if the feature isn't implemented instead. |
This area came up when when we upgraded gRPC to the latest version of preview 3. A combination of circumstances combined:
The main problem here is the difference in behavior between a real server and the TestServer. The test server is flushing each time StartAsync is called. That could be solved by #7778 |
The fallback behavior is OK, but we should go ahead and implement |
Triage: We won't be doing this. Instead we'll do #7779 |
Why are we not adding the feature to TestServer? |
I think I named the issue poorly and it was misunderstood? We should still add the feature to the test server. |
Related: TestServer should be using real pipes instead of the stream adapters |
To mimic the Kestrel behaviour, a
IHttpResponseStartFeature
needs to be added by the TestServer. Otherwise it falls back to the flushing behaviour: https://github.com/aspnet/AspNetCore/blob/4646ed56189a8ee36ced6397dd4f86fce9e6a8e8/src/Http/Http/src/Internal/DefaultHttpResponse.cs#L154-L159.The text was updated successfully, but these errors were encountered: