mirror of
https://github.com/KeyZox71/webserv.git
synced 2025-07-17 15:16:32 +02:00
「✨」 feat: implemented succecfully that f*cking pfdmanager
This commit is contained in:
@ -6,21 +6,26 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/04/30 09:40:16 by adjoly #+# #+# */
|
||||
/* Updated: 2025/05/04 12:25:43 by adjoly ### ########.fr */
|
||||
/* Updated: 2025/05/27 16:49:05 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "cppeleven.hpp"
|
||||
#include <algorithm>
|
||||
#include <dirent.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <vector>
|
||||
|
||||
#include <server/default.hpp>
|
||||
#include <requests/default.hpp>
|
||||
|
||||
using namespace webserv::http;
|
||||
|
||||
Get::Get(std::string &data) { this->parse(data); }
|
||||
Get::Get(std::string &data) {
|
||||
// _cgi = not_nullptr;
|
||||
this->parse(data);
|
||||
}
|
||||
|
||||
void Get::parse(std::string const &data) {
|
||||
std::istringstream stream(data);
|
||||
@ -50,8 +55,10 @@ void Get::parse(std::string const &data) {
|
||||
|
||||
_url = new URL("http://" + _headers["Host"] + _target);
|
||||
|
||||
/*std::cout << "wtf = " << _headers["Host"] << std::endl;
|
||||
std::cout << *_url << std::endl;*/
|
||||
// if (_route->isCgi(_target)) {
|
||||
// _cgi = new server::Cgi(this, _route);
|
||||
// server::ResourceManager::append(_cgi);
|
||||
// }
|
||||
|
||||
/*
|
||||
std::cout << "-- start-line --" << std::endl;
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/04/30 09:50:20 by adjoly #+# #+# */
|
||||
/* Updated: 2025/05/03 09:44:41 by adjoly ### ########.fr */
|
||||
/* Updated: 2025/05/27 09:23:54 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -84,7 +84,6 @@ void Post::handleMultipartData(const std::string &body, const std::string &bound
|
||||
|
||||
if (end != std::string::npos) {
|
||||
std::string part_header = body.substr(start, end - start);
|
||||
// std::cout << std::endl << std::endl << std::endl << std::endl;
|
||||
std::string part_content =
|
||||
body.substr(end + 4, body.find(delim, end) - end - 4);
|
||||
|
||||
@ -94,7 +93,7 @@ void Post::handleMultipartData(const std::string &body, const std::string &bound
|
||||
outfile.write(part_content.c_str(), part_content.length());
|
||||
outfile.close();
|
||||
} else {
|
||||
std::cerr << "open failed" << std::endl;
|
||||
_log->error("open failed D:");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user