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:
@ -1,5 +1,5 @@
|
||||
[server]
|
||||
host = "0.0.0.0"
|
||||
port = 80
|
||||
port = 8090
|
||||
|
||||
[server.location./]
|
||||
|
@ -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 */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
BIN
vgcore.37584
Normal file
BIN
vgcore.37584
Normal file
Binary file not shown.
BIN
vgcore.38779
Normal file
BIN
vgcore.38779
Normal file
Binary file not shown.
BIN
vgcore.39674
Normal file
BIN
vgcore.39674
Normal file
Binary file not shown.
BIN
vgcore.40066
Normal file
BIN
vgcore.40066
Normal file
Binary file not shown.
BIN
vgcore.41056
Normal file
BIN
vgcore.41056
Normal file
Binary file not shown.
BIN
vgcore.41145
Normal file
BIN
vgcore.41145
Normal file
Binary file not shown.
BIN
vgcore.41333
Normal file
BIN
vgcore.41333
Normal file
Binary file not shown.
Reference in New Issue
Block a user