public void WriteHeaders(HTTPStatus.Code StatusCode, string contentType = "") { this.OutputStream.Write("HTTP/1.0 " + HTTPStatus.Headers[(int)StatusCode]); if (contentType != "" && contentType != null) { this.OutputStream.WriteLine("Content-Type: " + contentType); } this.OutputStream.WriteLine("Connection: close"); this.OutputStream.WriteLine(""); }
public static int ValueOf(HTTPStatus.Code code) { return((int)code); }