mirror of
https://github.com/KeyZox71/webserv.git
synced 2025-06-25 09:33:36 +02:00
「🔨」 fix: fixed this shit
This commit is contained in:
@ -60,7 +60,7 @@ Route::Route(toml::ANode *table) : _max_body(10485760) {
|
||||
void *val;
|
||||
bool found;
|
||||
|
||||
if (table == not_nullptr) {
|
||||
if (table == not_nullptr || table->getTable()->empty()) {
|
||||
_log->warn("is empty");
|
||||
_index = "index.html";
|
||||
_redirect = false;
|
||||
@ -93,6 +93,7 @@ Route::Route(toml::ANode *table) : _max_body(10485760) {
|
||||
_methods[2] = false;
|
||||
return;
|
||||
}
|
||||
std::cout << "tat me re " << std::endl;
|
||||
val = accessValue("redirect", toml::STRING, _table, _log);
|
||||
if (val != not_nullptr) {
|
||||
_root = *static_cast<std::string *>(val);
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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)));
|
||||
}
|
||||
}
|
||||
if (_routes == not_nullptr || _routes->empty()){
|
||||
throw std::runtime_error("put a location dumb ass");
|
||||
}
|
||||
// delete _table;
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
Reference in New Issue
Block a user