reference Server in WebServerProcessRequestEventArgs
This commit is contained in:
parent
94e3fcec40
commit
a343a6477d
@ -281,7 +281,7 @@ public class WebServer
|
||||
WebContext context = new WebContext((WebApplication)Application.Instance, new WebRequest(version, requestMethod, path, headers, pathVariables, form), new WebResponse(), session);
|
||||
context.Response.Cookies.Add("JSESSIONID", cookieValue, WebCookieScope.FromPath("/"), WebCookieSecurity.Secure | WebCookieSecurity.HttpOnly, WebCookieSameSite.None);
|
||||
|
||||
WebServerProcessRequestEventArgs e = new WebServerProcessRequestEventArgs(client, context);
|
||||
WebServerProcessRequestEventArgs e = new WebServerProcessRequestEventArgs(this, client, context);
|
||||
OnProcessRequest(e);
|
||||
if (e.Handled)
|
||||
{
|
||||
|
||||
@ -7,11 +7,13 @@ namespace MBS.Web;
|
||||
|
||||
public class WebServerProcessRequestEventArgs : EventArgs
|
||||
{
|
||||
public WebServer Server { get; }
|
||||
public WebContext Context { get; }
|
||||
public bool Handled { get; set; } = false;
|
||||
|
||||
public WebServerProcessRequestEventArgs(System.Net.Sockets.TcpClient client, WebContext context)
|
||||
public WebServerProcessRequestEventArgs(WebServer server, System.Net.Sockets.TcpClient client, WebContext context)
|
||||
{
|
||||
Server = server;
|
||||
Context = context;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user