-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Clean] Define in Common & Remove unused classes and methods
- Loading branch information
1 parent
25499f0
commit 3076ea3
Showing
20 changed files
with
66 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
# By: agaley <[email protected]> +#+ +:+ +#+ # | ||
# +#+#+#+#+#+ +#+ # | ||
# Created: 2023/12/15 15:51:13 by agaley #+# #+# # | ||
# Updated: 2024/07/16 21:45:32 by mchenava ### ########.fr # | ||
# Updated: 2024/07/22 18:45:13 by agaley ### ########lyon.fr # | ||
# # | ||
# **************************************************************************** # | ||
|
||
|
@@ -37,10 +37,9 @@ SRC = $(SRC_DIR)/Server.cpp \ | |
$(SRC_DIR)/ConnectionHandler.cpp $(SRC_DIR)/CacheHandler.cpp \ | ||
$(SRC_DIR)/Worker.cpp $(SRC_DIR)/EventQueue.cpp $(SRC_DIR)/EventData.cpp \ | ||
$(SRC_DIR)/HTTPRequest.cpp $(SRC_DIR)/HTTPResponse.cpp $(SRC_DIR)/URI.cpp \ | ||
$(SRC_DIR)/CGIHandler.cpp \ | ||
$(SRC_DIR)/VirtualServer.cpp $(SRC_DIR)/Common.cpp \ | ||
$(SRC_DIR)/CGIHandler.cpp $(SRC_DIR)/VirtualServer.cpp \ | ||
$(SRC_DIR)/Exception.cpp $(SRC_DIR)/HTTPMethods.cpp \ | ||
$(SRC_DIR)/ErrorHandler.cpp $(SRC_DIR)/Logger.cpp $(SRC_DIR)/Utils.cpp \ | ||
$(SRC_DIR)/Logger.cpp $(SRC_DIR)/Utils.cpp \ | ||
$(SRC_DIR)/main.cpp | ||
|
||
OBJ = $(patsubst $(SRC_DIR)/%.cpp, $(OBJ_DIR)/%.o, $(SRC)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: agaley <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2024/04/30 16:11:09 by agaley #+# #+# */ | ||
/* Updated: 2024/07/22 18:07:41 by agaley ### ########lyon.fr */ | ||
/* Updated: 2024/07/22 18:38:46 by agaley ### ########lyon.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -30,9 +30,6 @@ | |
#include "Logger.hpp" | ||
|
||
class CacheHandler; | ||
|
||
#define CGI_TIMEOUT_SEC 10 | ||
|
||
struct EventData; | ||
|
||
class CGIHandler { | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: agaley <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2024/04/30 16:11:17 by agaley #+# #+# */ | ||
/* Updated: 2024/07/02 23:48:35 by agaley ### ########lyon.fr */ | ||
/* Updated: 2024/07/22 18:30:08 by agaley ### ########lyon.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -38,9 +38,6 @@ class ConfigManager { | |
* @return The configuration object. | ||
*/ | ||
Config& getConfig(); | ||
ServerConfig& getServerConfig(); | ||
const LocationConfig& getLocationConfig() const; | ||
ListenConfig& getListenConfig(); | ||
static void printConfig(); | ||
|
||
static void loadConfig(const std::string& filepath); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: agaley <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2024/04/30 16:11:21 by agaley #+# #+# */ | ||
/* Updated: 2024/07/22 18:03:18 by agaley ### ########lyon.fr */ | ||
/* Updated: 2024/07/22 18:38:01 by agaley ### ########lyon.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -19,9 +19,6 @@ | |
#include "ConnectionHandler.hpp" | ||
#include "Utils.hpp" | ||
|
||
const int ConnectionHandler::MAX_TRIES = 10; | ||
const time_t ConnectionHandler::TIMEOUT = 10; | ||
|
||
ConnectionHandler::ConnectionHandler(int clientSocket, | ||
int epollSocket, | ||
std::vector<VirtualServer*>& virtualServers, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: agaley <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2024/04/30 16:11:25 by agaley #+# #+# */ | ||
/* Updated: 2024/07/22 17:48:56 by agaley ### ########lyon.fr */ | ||
/* Updated: 2024/07/22 18:41:27 by agaley ### ########lyon.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -29,8 +29,6 @@ | |
#include "Logger.hpp" | ||
#include "VirtualServer.hpp" | ||
|
||
#define BUFFER_SIZE 16384 | ||
|
||
class VirtualServer; | ||
class CGIHandler; | ||
|
||
|
@@ -40,8 +38,6 @@ class ConnectionHandler { | |
std::string getStatusString() const; | ||
int processConnection(struct epoll_event& event); | ||
void setInternalServerError(); | ||
static const int MAX_TRIES; | ||
static const time_t TIMEOUT; | ||
|
||
ConnectionHandler(int clientSocket, | ||
int epollSocket, | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: agaley <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2024/04/24 13:21:59 by mchenava #+# #+# */ | ||
/* Updated: 2024/07/03 01:10:15 by agaley ### ########lyon.fr */ | ||
/* Updated: 2024/07/22 18:42:12 by agaley ### ########lyon.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -22,10 +22,6 @@ | |
|
||
#include "Config.hpp" | ||
|
||
#define LOG_FILE_PATH "./logs/" | ||
#define LOG_FILE_NAME "webserv" | ||
#define LOG_FILE_EXT ".log" | ||
|
||
class Logger { | ||
public: | ||
static Logger& getInstance(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: agaley <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2024/04/28 15:34:02 by agaley #+# #+# */ | ||
/* Updated: 2024/07/04 20:47:08 by agaley ### ########lyon.fr */ | ||
/* Updated: 2024/07/22 18:35:10 by agaley ### ########lyon.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -215,7 +215,7 @@ void Server::_setupServerSockets() { | |
continue; | ||
} | ||
|
||
if (set_non_blocking(sock) < 0) { | ||
if (Utils::set_non_blocking(sock) < 0) { | ||
_log.error("(" + listenConfig.address + ":" + Utils::to_string(listenConfig.port) + | ||
") Failed to set socket to non-blocking"); | ||
close(sock); | ||
|
Oops, something went wrong.