From e96b359bb8583ddd420bae9c9c525f2a7dccb2e9 Mon Sep 17 00:00:00 2001 From: Mike Nolan Date: Mon, 12 Jan 2026 14:05:38 -0600 Subject: [PATCH] Add route server --- src/Http/RouteServer.cpp | 2 +- src/Streams/NetworkStream.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Http/RouteServer.cpp b/src/Http/RouteServer.cpp index cbcec35..d9fb6a4 100644 --- a/src/Http/RouteServer.cpp +++ b/src/Http/RouteServer.cpp @@ -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; diff --git a/src/Streams/NetworkStream.cpp b/src/Streams/NetworkStream.cpp index 07ff02d..445cb75 100644 --- a/src/Streams/NetworkStream.cpp +++ b/src/Streams/NetworkStream.cpp @@ -47,7 +47,7 @@ extern "C" { #if defined(AF_UNIX) && !defined(GEKKO) && !defined(__SWITCH__) && !defined(__PS2__) #include #endif -#include +#include } #endif #if defined(GEKKO)