Merge branch 'test'

This commit is contained in:
Michael Becker 2024-08-12 23:12:30 -04:00
commit 96df91bd53
2 changed files with 4 additions and 2 deletions

View File

@ -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); 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); 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); OnProcessRequest(e);
if (e.Handled) if (e.Handled)
{ {

View File

@ -7,11 +7,13 @@ namespace MBS.Web;
public class WebServerProcessRequestEventArgs : EventArgs public class WebServerProcessRequestEventArgs : EventArgs
{ {
public WebServer Server { get; }
public WebContext Context { get; } public WebContext Context { get; }
public bool Handled { get; set; } = false; 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; Context = context;
} }