mirror of
https://onedev.site.tesses.net/tesses-framework
synced 2026-02-08 07:45:46 +00:00
Add route server
This commit is contained in:
@@ -51,7 +51,7 @@ namespace Tesses::Framework::Http
|
||||
auto path = Tesses::Framework::Filesystem::VFSPath::ParseUriPath(ctx.path);
|
||||
for(auto& svr : this->routes)
|
||||
{
|
||||
if(svr.method != ctx.method) continue;
|
||||
if(svr.method != ctx.method && !((svr.method == "GET" && ctx.method == "HEAD") || (svr.method == "HEAD" && ctx.method == "GET"))) continue;
|
||||
ctx.pathArguments = pathArgs;
|
||||
if(svr.Equals(path, ctx.pathArguments) && svr.handler && svr.handler(ctx))
|
||||
return true;
|
||||
|
||||
@@ -47,7 +47,7 @@ extern "C" {
|
||||
#if defined(AF_UNIX) && !defined(GEKKO) && !defined(__SWITCH__) && !defined(__PS2__)
|
||||
#include <sys/un.h>
|
||||
#endif
|
||||
#include <sys/poll.h>
|
||||
#include <poll.h>
|
||||
}
|
||||
#endif
|
||||
#if defined(GEKKO)
|
||||
|
||||
Reference in New Issue
Block a user