This repository has been archived by the owner on Dec 18, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 526
HttpContext disposed before the error code is set. #876
Comments
@muratg What milestone should this be in? It seems mainly to lead 200 statuses in logs for 500 responses sent by Kestrel caused by uncaught exceptions thrown by the application. This is only an issue if the application hasn't written to the response body prior to throwing. |
I think we can get to this post RTM. |
mikeharder
added a commit
that referenced
this issue
Jul 19, 2016
cesarblum
pushed a commit
that referenced
this issue
Oct 7, 2016
cesarblum
pushed a commit
that referenced
this issue
Oct 11, 2016
cesarblum
pushed a commit
that referenced
this issue
Oct 11, 2016
cesarblum
pushed a commit
that referenced
this issue
Oct 11, 2016
cesarblum
pushed a commit
that referenced
this issue
Oct 12, 2016
cesarblum
pushed a commit
that referenced
this issue
Oct 12, 2016
cesarblum
pushed a commit
that referenced
this issue
Oct 13, 2016
cesarblum
pushed a commit
that referenced
this issue
Oct 17, 2016
cesarblum
pushed a commit
that referenced
this issue
Oct 17, 2016
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently in
FrameOfT
theHttpContext
(https://github.com/aspnet/KestrelHttpServer/blob/dev/src/Microsoft.AspNetCore.Server.Kestrel/Http/FrameOfT.cs#L119) is disposed beforeProduceEnd()
is called (https://github.com/aspnet/KestrelHttpServer/blob/dev/src/Microsoft.AspNetCore.Server.Kestrel/Http/FrameOfT.cs#L133). Disposing of theHttpContext
should only happen after Kestrel is really done with it, otherwise we can get into situations where the response on theHttpContext
is not correctly set.For example, we see in aspnet/Hosting#763 when logging the end of the request, the error code is not set correctly to
500
:cc @CesarBS @halter73
The text was updated successfully, but these errors were encountered: