Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

Test server should fire onResponseCompleted after the actual response has completed instead of just the headers #721

Closed
javiercn opened this issue Apr 20, 2016 · 0 comments
Assignees
Milestone

Comments

@javiercn
Copy link
Member

Currently TestServer fires OnResponseCompleted here:
https://github.com/aspnet/Hosting/blob/dev/src/Microsoft.AspNetCore.TestHost/ClientHandler.cs#L202
At this point, the response stream might have not been completely written to the response which might cause the response get cut in multiple and bizarre ways.

Instead, the event needs to be triggered after the response has been completed here:
https://github.com/aspnet/Hosting/blob/dev/src/Microsoft.AspNetCore.TestHost/ClientHandler.cs#L195

We should also add more logging to the different pieces on TestHost to ensure that its easy to troubleshoot these types of issues if necessary, one such way is to allow providing a logger that can be used to trace important events like the response finishing, etc

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants