Test: Do not set response headers after the response has started
This commit is contained in:
parent
d9825d1547
commit
a7c9e8ab25
|
|
@ -18,9 +18,12 @@ namespace FiltersWebSite
|
||||||
|
|
||||||
public void OnResourceExecuted(ResourceExecutedContext context)
|
public void OnResourceExecuted(ResourceExecutedContext context)
|
||||||
{
|
{
|
||||||
context.HttpContext.Response.Headers.Append(
|
if (!context.HttpContext.Response.HasStarted)
|
||||||
"filters",
|
{
|
||||||
Name + " - OnResourceExecuted");
|
context.HttpContext.Response.Headers.Append(
|
||||||
|
"filters",
|
||||||
|
Name + " - OnResourceExecuted");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnResourceExecuting(ResourceExecutingContext context)
|
public void OnResourceExecuting(ResourceExecutingContext context)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue