private void DropRequest(ServerResponse res, ushort code, string reason, string body, params Header[] otherHeaders) { res.SetHead(code, reason, new Header("Content-Length", body.Length.ToString()), new Header("Connection", "close")); foreach (Header h in otherHeaders) { res.SetHeader(h.Name, h.Value); } res.Write(body); res.End(); }