Universe.Framework.Servers.HttpServer.BaseHttpServer.GetHTML404 C# (CSharp) Method

GetHTML404() public method

public GetHTML404 ( OSHttpResponse response ) : byte[]
response Universe.Framework.Servers.HttpServer.Implementation.OSHttpResponse
return byte[]
        public byte [] GetHTML404 (OSHttpResponse response)
        {
            // I know this statuscode is dumb, but the client doesn't respond to 404s and 500s
            response.StatusCode = 404;
            response.AddHeader ("Content-type", "text/html");

            string responseString = GetHTTP404 ();
            byte [] buffer = Encoding.UTF8.GetBytes (responseString);

            response.SendChunked = false;
            response.ContentEncoding = Encoding.UTF8;

            return buffer;
        }