libirek.Header.Header C# (CSharp) Method

Header() public method

Initializes a new instance of the Header class.
public Header ( string Version, string Type, int Length, string Status ) : System
Version string
Type string
Length int
Status string The status.
return System
        public Header(string Version, string Type, int Length, string Status)
        {
            HttpVersion = Version;
            ContentType = Type;
            HttpStatus = Status;
            ContentLength = Length;
            Cookie = null;
            String buffer = "";

            if (ContentType.Length == 0)
            {
                ContentType = "text/html";
            }
            buffer = buffer + HttpVersion + HttpStatus + "\r\n";
            buffer = buffer + "Server: irek\r\n";
            buffer = buffer + "Content-Type: " + ContentType + "\r\n";
            buffer = buffer + "Accept-Ranges: bytes\r\n";
            buffer = buffer + "Content-Length: " + ContentLength + "\r\n\r\n";
            header = buffer;
        }