a few more things for location picker

This commit is contained in:
Me
2022-08-11 00:36:24 +02:00
parent 69c1a6f6bf
commit 0b51d13f13
4 changed files with 21 additions and 8 deletions

View File

@@ -11,12 +11,16 @@ if file, server that!
Where does cgi fit in in all this ???
*/
std::string path = client->get_rq_abs_path();
// this might not be the best thing, a voir
path.insert(0, client->assigned_location->root);
// path.insert(0, client->assigned_location->root);
//client->assigned_location->path
path.replace(0, client->assigned_location->path.size(), client->assigned_location->root);
std::cerr << "path = " << path << "\n";
@@ -25,6 +29,9 @@ Where does cgi fit in in all this ???
// or autoindex if allowed
// or let _get_file sort out the error otherwise.
// change this cuz
// if (path_is_valid(client->assigned_location->root) == 2)
// _get_file(...);
if (path_is_valid(path) == 1)
{
// std::cout << "path is valid\n";