/// <summary> /// Configures response with redirect status and headers. This method also aborts the work pipeline,so /// the processing of filters and handlers does not continue. See also 'Redirect(url)' /// </summary> public void RedirectAndAbort(string url, WebConsts.RedirectCode code = WebConsts.RedirectCode.Found_302) { this.Redirect(url, code); Work.Aborted = true; }
public Redirect(string url, WebConsts.RedirectCode code = WebConsts.RedirectCode.Found_302) { URL = url; Code = code; }
/// <summary> /// Configures response with redirect status and headers. This method DOES NOT ABORT the work pipeline,so /// the processing of filters and handlers continues unless 'work.Aborted = true' is issued in code. /// See also 'RedirectAndAbort(url)' /// </summary> public void Redirect(string url, WebConsts.RedirectCode code = WebConsts.RedirectCode.Found_302) { //20160707 DKh m_NetResponse.Redirect(url); m_NetResponse.Headers.Set(HttpResponseHeader.Location, url); m_NetResponse.StatusCode = WebConsts.GetRedirectStatusCode(code); m_NetResponse.StatusDescription = WebConsts.GetRedirectStatusDescription(code); }