「🔨」 fix: fixed this shit

This commit is contained in:
KeyZox committed 2025-06-17 19:14:10 +02:00
1 parent 7ea43723e1
commit 0f9057e16e
11 files changed
+8 -4

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
[server] [server]
host = "0.0.0.0" host = "0.0.0.0"
port = 80 port = 8090
[server.location./] [server.location./]
+2 -1
View File
@@ -60,7 +60,7 @@ Route::Route(toml::ANode *table) : _max_body(10485760) {
void *val; void *val;
bool found; bool found;
if (table == not_nullptr) { if (table == not_nullptr || table->getTable()->empty()) {
_log->warn("is empty"); _log->warn("is empty");
_index = "index.html"; _index = "index.html";
_redirect = false; _redirect = false;
@@ -93,6 +93,7 @@ Route::Route(toml::ANode *table) : _max_body(10485760) {
_methods[2] = false; _methods[2] = false;
return; return;
} }
std::cout << "tat me re " << std::endl;
val = accessValue("redirect", toml::STRING, _table, _log); val = accessValue("redirect", toml::STRING, _table, _log);
if (val != not_nullptr) { if (val != not_nullptr) {
_root = *static_cast<std::string *>(val); _root = *static_cast<std::string *>(val);
+4 -1
View File
@@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */ /* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2025/03/24 15:10:07 by adjoly #+# #+# */ /* Created: 2025/03/24 15:10:07 by adjoly #+# #+# */
/* Updated: 2025/06/09 18:40:23 by adjoly ### ########.fr */ /* Updated: 2025/06/17 19:14:04 by adjoly ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@@ -87,6 +87,9 @@ Server::Server(toml::ANode *node)
std::make_pair(URL(it->first), new Route(it->second))); std::make_pair(URL(it->first), new Route(it->second)));
} }
} }
if (_routes == not_nullptr || _routes->empty()){
throw std::runtime_error("put a location dumb ass");
}
// delete _table; // delete _table;
} }
@@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */ /* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/30 09:40:16 by adjoly #+# #+# */ /* Created: 2025/04/30 09:40:16 by adjoly #+# #+# */
/* Updated: 2025/05/30 16:39:08 by adjoly ### ########.fr */ /* Updated: 2025/06/17 19:07:39 by adjoly ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.