private void WriteBeginResponseHeaders(ref WritableBuffer buffer, ref bool autoChunk) { if (HasStarted) { return; } HasStarted = true; buffer.Write(_http11Bytes.Slice()); var status = ReasonPhrases.ToStatusBytes(StatusCode); buffer.Write(status.Slice()); autoChunk = !HasContentLength && !HasTransferEncoding && KeepAlive; ResponseHeaders.CopyTo(autoChunk, ref buffer); }
private void WriteBeginResponseHeaders(PipeWriter buffer) { if (HasStarted) { return; } HasStarted = true; buffer.Write(_http11Bytes); var status = ReasonPhrases.ToStatusBytes(StatusCode); buffer.Write(status); _autoChunk = !HasContentLength && !HasTransferEncoding && KeepAlive; ResponseHeaders.CopyTo(_autoChunk, buffer); }
private void WriteBeginResponseHeaders() { if (HasStarted) { return; } HasStarted = true; if (_isHttp2) { throw new NotImplementedException(); } else { _outputFormatter.Write(_http11Bytes); var status = ReasonPhrases.ToStatusBytes(StatusCode); _outputFormatter.Write(status); _autoChunk = !HasContentLength && !HasTransferEncoding && KeepAlive; ResponseHeaders.CopyTo(_autoChunk, _outputFormatter); } }