From cccc25fba16d70a641762ab6b5e1f62eaa830a37 Mon Sep 17 00:00:00 2001 From: adjoly Date: Mon, 26 May 2025 17:29:02 +0200 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=F0=9F=94=A8=E3=80=8D=20fix(cgi=5Fconf?= =?UTF-8?q?ig):=20fixed=20error=20print=20also=20fixed=20test.toml=20confi?= =?UTF-8?q?g=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exemples/test.toml | 2 +- src/config/Route.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/exemples/test.toml b/exemples/test.toml index 534b04e..a247a84 100644 --- a/exemples/test.toml +++ b/exemples/test.toml @@ -21,7 +21,7 @@ index = "index.html" methods = { "GET", "POST" } root = "/nfs/homes/mmoussou" upload_path = "/etc/webserv/up" -cgi.go = "/bin/go" +cgi = { ".py", ".go" } [server.location./redir] redirect = "https://kanel.ovh" diff --git a/src/config/Route.cpp b/src/config/Route.cpp index 09bbea5..fc05fb5 100644 --- a/src/config/Route.cpp +++ b/src/config/Route.cpp @@ -27,8 +27,8 @@ std::vector *Route::_parseCGI(toml::ANode *table) { cgi->push_back(*static_cast((*it)->getValue())); else { std::stringstream str; - str << "Was expecting a : " << toml::nodeTypeToStr(toml::STRING); - str << " but got a : " << toml::nodeTypeToStr((*it)->type()); + str << "Was expecting a: " << toml::nodeTypeToStr(toml::STRING); + str << ", but got a: " << toml::nodeTypeToStr((*it)->type()); _log->warn(str.str()); } }