diff --git a/AutoindexController/AutoindexController.cpp b/AutoindexController/AutoindexController.cpp
index d36556d..2d59662 100644
--- a/AutoindexController/AutoindexController.cpp
+++ b/AutoindexController/AutoindexController.cpp
@@ -1,33 +1,24 @@
#include "AutoindexController.hpp"
-std::string
- AutoindexController::getAutoIndexBody(
- std::string _root,
- std::string _path)
-{
- FileController
- _folder = FileController(_root + _path, FileController::READ);
- std::stringstream
- _msg_body;
+std::string AutoindexController::getAutoIndexBody(std::string _root, std::string _path) {
+ FileController _folder = FileController(_root + _path, FileController::READ);
+ std::stringstream _msg_body;
_msg_body << "
";
_msg_body << "Index of " + _path + "";
_msg_body << "";
_msg_body << "Index of " + _path + "
";
- for (int _idx = 0; _idx < _folder.getFilesSize(); _idx++)
- {
- if (_folder.getFiles(_idx)->_name == std::string("."))
+
+ for (int _idx = 0; _idx < _folder.getFilesSize(); _idx++) {
+ if (_folder.getFiles(_idx)->name == std::string("."))
continue ;
- std::string
- _file_name;
- if (_folder.getFiles(_idx)->_type == FileController::DIRECTORY)
- _file_name = _folder.getFiles(_idx)->_name + std::string("/");
+ std::string _file_name;
+ if (_folder.getFiles(_idx)->type == FileController::DIRECTORY)
+ _file_name = _folder.getFiles(_idx)->name + std::string("/");
else
- _file_name = _folder.getFiles(_idx)->_name;
+ _file_name = _folder.getFiles(_idx)->name;
std::cout << "Autoindex test : " << _file_name << std::endl;
- // _msg_body << "";
-
_msg_body << ""));
_msg_body << std::right;
- _msg_body << _folder.getFiles(_idx)->_genr_time;
+ _msg_body << _folder.getFiles(_idx)->gen_time;
_msg_body << std::setw(20) << std::setfill(' ');
- if (_folder.getFiles(_idx)->_type == FileController::DIRECTORY)
+ if (_folder.getFiles(_idx)->type == FileController::DIRECTORY)
_msg_body << "-" << std::endl;
else
- _msg_body << _folder.getFiles(_idx)->_size << std::endl;
+ _msg_body << _folder.getFiles(_idx)->size << std::endl;
}
_msg_body << "
";
diff --git a/AutoindexController/AutoindexController.hpp b/AutoindexController/AutoindexController.hpp
index c20c51b..1343908 100644
--- a/AutoindexController/AutoindexController.hpp
+++ b/AutoindexController/AutoindexController.hpp
@@ -13,9 +13,7 @@ extern NginxConfig::GlobalConfig _config;
class AutoindexController {
public:
- static std::string
- getAutoIndexBody(
- std::string root_path, std::string dir_path);
+ static std::string getAutoIndexBody(std::string root_path, std::string dir_path);
};
#endif
diff --git a/CGI/CGIData.cpp b/CGI/CGIData.cpp
deleted file mode 100644
index c1c827c..0000000
--- a/CGI/CGIData.cpp
+++ /dev/null
@@ -1,193 +0,0 @@
-#include
-#include
-#include
-#include
-#include
-#include