internal Interop.HttpApi.HTTP_FLAGS ComputeLeftToWrite()
{
if (NetEventSource.IsEnabled) NetEventSource.Info(this, "_LeftToWrite:" + _leftToWrite);
Interop.HttpApi.HTTP_FLAGS flags = Interop.HttpApi.HTTP_FLAGS.NONE;
if (!_httpContext.Response.ComputedHeaders)
{
flags = _httpContext.Response.ComputeHeaders();
}
if (_leftToWrite == long.MinValue)
{
Interop.HttpApi.HTTP_VERB method = _httpContext.GetKnownMethod();
_leftToWrite = method != Interop.HttpApi.HTTP_VERB.HttpVerbHEAD ? _httpContext.Response.ContentLength64 : 0;
if (NetEventSource.IsEnabled) NetEventSource.Info(this, "_LeftToWrite:" + _leftToWrite);
}
return flags;
}