public CopyStream(IHttpStreamReader reader, IHttpStreamWriter writer, IBufferPool bufferPool) { this.reader = reader; this.writer = writer; buffer = bufferPool.GetBuffer(); this.bufferPool = bufferPool; }
internal LimitedStream(IHttpStreamReader baseStream, IBufferPool bufferPool, bool isChunked, long contentLength) { this.baseReader = baseStream; this.bufferPool = bufferPool; this.isChunked = isChunked; bytesRemaining = isChunked ? 0 : contentLength == -1 ? long.MaxValue : contentLength; }