lots of log message and fixed bad_file_descriptor issue

This commit is contained in:
hugogogo
2022-08-22 01:50:28 +02:00
parent 469eca8aa9
commit 5225e3258b
18 changed files with 186 additions and 112 deletions

View File

@@ -7,7 +7,7 @@
void Webserv::_post(Client *client, const std::string &path)
{
(void)path; // unused, we use "assigned_location->upload_dir" instead
std::cout << "_post()\n";
std::cerr << "_post()\n";
if (client->get_rq_abs_path() != client->assigned_location->path)
client->status = 404; // 404 or other status better ?
@@ -27,7 +27,7 @@ void Webserv::_post(Client *client, const std::string &path)
#define DEFAULT_NAME "unnamed_file"
void Webserv::_upload_files(Client *client)
{
std::cout << "_upload_files()\n";
std::cerr << "_upload_files()\n";
std::ofstream ofd;
std::vector<MultipartBody>::const_iterator body_it = client->get_rq_multi_bodys().begin();
std::string path;