internal UnsafeNclNativeMethods.HttpApi.HTTP_FLAGS ComputeLeftToWrite() { GlobalLog.Print("HttpResponseStream#" + ValidationHelper.HashString(this) + "::ComputeLeftToWrite() on entry m_LeftToWrite:" + m_LeftToWrite); UnsafeNclNativeMethods.HttpApi.HTTP_FLAGS flags = UnsafeNclNativeMethods.HttpApi.HTTP_FLAGS.NONE; if (!m_HttpContext.Response.ComputedHeaders) { flags = m_HttpContext.Response.ComputeHeaders(); } if (m_LeftToWrite == long.MinValue) { UnsafeNclNativeMethods.HttpApi.HTTP_VERB method = m_HttpContext.GetKnownMethod(); m_LeftToWrite = method != UnsafeNclNativeMethods.HttpApi.HTTP_VERB.HttpVerbHEAD ? m_HttpContext.Response.ContentLength64 : 0; GlobalLog.Print("HttpResponseStream#" + ValidationHelper.HashString(this) + "::ComputeLeftToWrite() computed m_LeftToWrite:" + m_LeftToWrite); } return(flags); }
internal Interop.HttpApi.HTTP_FLAGS ComputeLeftToWrite() { if (NetEventSource.Log.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.Log.IsEnabled()) { NetEventSource.Info(this, "_LeftToWrite:" + _leftToWrite); } } return(flags); }