Add route server

This commit is contained in:
2026-01-12 14:05:38 -06:00
parent 848fca7f36
commit e96b359bb8
2 changed files with 2 additions and 2 deletions

View File

@@ -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;

View File

@@ -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)