Le merge / 20
This commit is contained in:
@@ -211,27 +211,22 @@ void Client::_parse_chunked_body(size_t pos)
|
||||
|
||||
|
||||
|
||||
// TODO HUGO : faire la fonction, mdr.
|
||||
void Client::fill_script_path(const std::string &path, size_t pos)
|
||||
void Client::fill_script_path(std::string &path, size_t pos)
|
||||
{
|
||||
(void)path;
|
||||
(void)pos;
|
||||
/* size_t pos;
|
||||
size_t len = path.size();
|
||||
std::string path = this->get_rq_abs_path();
|
||||
std::string tmp;
|
||||
|
||||
pos = path.find(script);
|
||||
if (pos == 0)
|
||||
/*DEBUG*/ std::cout << "\n" << B_PURPLE << "debug path dot" << RESET << "\npath:[" << path << "]\n" << "&path[pos]:[" << &path[pos] << "]\n";
|
||||
if (path[0] == '.')
|
||||
{
|
||||
tmp = path.substr(0, pos + len);
|
||||
_request.script.path = "./srcs" + tmp; // TODO: root path ?
|
||||
|
||||
_request.script.path = "./srcs" + tmp; // TODO: root path ?
|
||||
_request.script.info = path.substr(pos + len);
|
||||
return true;
|
||||
path.erase(0, 1);
|
||||
pos--;
|
||||
}
|
||||
return false; */
|
||||
/*DEBUG*/ std::cout << "path:[" << path << "]\n" << "&path[pos]:[" << &path[pos] << "]\n";
|
||||
|
||||
_request.script.path = path.substr(0, pos);
|
||||
/*DEBUG*/ std::cout << "script_path:[" << _request.script.path << "]\n";
|
||||
_request.script.info = path.substr(pos);
|
||||
/*DEBUG*/ std::cout << "script_info:[" << _request.script.info << "]\n" << B_PURPLE << "end debug path dot" << RESET << "\n";
|
||||
}
|
||||
|
||||
void Client::clear()
|
||||
|
||||
Reference in New Issue
Block a user