parent
20fc1adf2a
commit
e336f4010a
|
|
@ -400,7 +400,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
|
|||
set { _responseHeaders = value; }
|
||||
}
|
||||
|
||||
bool IHttpResponseFeature.HasStarted => Response.HasStarted;
|
||||
bool IHttpResponseFeature.HasStarted => _responseStarted;
|
||||
|
||||
void IHttpResponseFeature.OnStarting(Func<object, Task> callback, object state)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
|
|||
return Task.CompletedTask;
|
||||
});
|
||||
await httpContext.Response.StartAsync();
|
||||
Assert.True(httpContext.Response.HasStarted);
|
||||
Assert.True(httpContext.Response.Headers.IsReadOnly);
|
||||
await startingTcs.Task.WithTimeout();
|
||||
await httpContext.Response.WriteAsync("Hello World");
|
||||
|
|
@ -58,6 +59,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
|
|||
return Task.CompletedTask;
|
||||
});
|
||||
await httpContext.Response.CompleteAsync();
|
||||
Assert.True(httpContext.Response.HasStarted);
|
||||
Assert.True(httpContext.Response.Headers.IsReadOnly);
|
||||
await startingTcs.Task.WithTimeout();
|
||||
await responseReceived.Task.WithTimeout();
|
||||
|
|
|
|||
Loading…
Reference in New Issue