예제 #1
0
        public override byte[] GetBytes(params HttpHeader[] rewrites)
        {
            var data = GetHeader(rewrites);

            if (MessageBody != null)
            {
                int headerLength = data.Length;
                var mb           = MessageBody.GetBytes(Encoding);
                Array.Resize <byte>(ref data, headerLength + mb.Length);
                Buffer.BlockCopy(mb, 0, data, headerLength, mb.Length);
            }
            return(data);
        }