mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-20 17:42:50 +08:00
Can't set StatusCode after Response has started (#200)
This commit is contained in:
parent
31f526d3cd
commit
0784954971
@ -85,7 +85,10 @@ namespace Ocelot.Errors.Middleware
|
||||
|
||||
private void SetInternalServerErrorOnResponse(HttpContext context)
|
||||
{
|
||||
context.Response.StatusCode = 500;
|
||||
if (!context.Response.HasStarted)
|
||||
{
|
||||
context.Response.StatusCode = 500;
|
||||
}
|
||||
}
|
||||
|
||||
private string CreateMessage(HttpContext context, Exception e)
|
||||
|
Loading…
x
Reference in New Issue
Block a user