/// <summary> /// Initializes a new instance of the HttpMessage class /// </summary> /// <param name="message"></param> public HttpMessage(HttpMessage message) { _firstLine = message.FirstLine; _headers = new HttpHeaderList(); foreach(HttpHeader header in message.Headers) _headers.Add(new HttpHeader(header.Name, header.Value)); this.Body = message.Body; }
/// <summary> /// Initializes a new instance of the HttpMessage class /// </summary> /// <param name="message"></param> public HttpMessage(HttpMessage message) { _firstLine = message.FirstLine; _headers = new HttpHeaderList(); foreach (HttpHeader header in message.Headers) { _headers.Add(new HttpHeader(header.Name, header.Value)); } this.Body = message.Body; }
/// <summary> /// Initializes a new instance of the HttpChunkedBody class /// </summary> public HttpChunkedBody() { _chunks = new HttpChunkList(); _trailer = new HttpHeaderList(); }
/// <summary> /// Initializes a new instance of the HttpMessage class /// </summary> /// <param name="firstLine"></param> /// <param name="headers"></param> /// <param name="body"></param> public HttpMessage(string firstLine, HttpHeaderList headers, byte[] body) { _firstLine = firstLine; _headers = headers; this.Body = body; }
/// <summary> /// Initializes a new instance of the HttpMessage class /// </summary> /// <param name="firstLine"></param> /// <param name="headers"></param> public HttpMessage(string firstLine, HttpHeaderList headers) { _firstLine = firstLine; _headers = headers; this.Body = null; }
/// <summary> /// Initializes a new instance of the HttpMessage class /// </summary> public HttpMessage() { _headers = new HttpHeaderList(); }