-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
DoneThis issue has been fixedThis issue has been fixedarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-httpsyshelp wantedUp for grabs. We would accept a PR to help resolve this issueUp for grabs. We would accept a PR to help resolve this issue
Milestone
Description
Describe the bug
When a client cancels the web request(closing a browser for instance) the request is cancelled with a help of the CancelationToken
. Everything works fine but this log line is written into the log file:
2019-03-19T08:37:13.093+00:00 [17] ERR Microsoft.AspNetCore.Server.HttpSys.HttpSysListener [/main] - ResponseStream::Dispose; Fewer bytes were written than were specified in the Content-Length.
The reason is this line in the ResponseBody
class: https://github.com/aspnet/AspNetCore/blob/5f4be179e3bf6d88a53667935fc5c4bd2d71988c/src/Servers/HttpSys/src/RequestProcessing/ResponseBody.cs#L131
This line is executed when a server calls Dispose on the ResponseBody
instance and in general it is good have this check. But now it should have a distinction between the normal flow and the flow when a client is not connected anymore.
To Reproduce
--
Expected behavior
There should not be an error log like this:
2019-03-19T08:37:13.093+00:00 [17] ERR Microsoft.AspNetCore.Server.HttpSys.HttpSysListener [/main] - ResponseStream::Dispose; Fewer bytes were written than were specified in the Content-Length.
Metadata
Metadata
Assignees
Labels
DoneThis issue has been fixedThis issue has been fixedarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-httpsyshelp wantedUp for grabs. We would accept a PR to help resolve this issueUp for grabs. We would accept a PR to help resolve this issue