public override void CloseConnection() { if (log.IsDebugEnabled) { log.Debug("Calling CloseConnection()"); } OrigWorker.CloseConnection(); }
static void Redirect(HttpWorkerRequest wr, string location) { string host = wr.GetKnownRequestHeader(HttpWorkerRequest.HeaderHost); wr.SendStatus(301, "Moved Permanently"); wr.SendUnknownResponseHeader("Connection", "close"); wr.SendUnknownResponseHeader("Date", DateTime.Now.ToUniversalTime().ToString("r")); wr.SendUnknownResponseHeader("Location", String.Format("http://{0}{1}", host, location)); Encoding enc = Encoding.ASCII; wr.SendUnknownResponseHeader("Content-Type", "text/html; charset=" + enc.WebName); string content = String.Format(CONTENT301, host, location); byte [] contentBytes = enc.GetBytes(content); wr.SendUnknownResponseHeader("Content-Length", contentBytes.Length.ToString()); wr.SendResponseFromMemory(contentBytes, contentBytes.Length); wr.FlushResponse(true); wr.CloseConnection(); }
/// <summary> /// Terminates the connection with the client. /// </summary> public override void CloseConnection() { _request.CloseConnection(); }
public override void CloseConnection() { _httpWorkerRequest.CloseConnection(); }