Closed Nikster3k closed 2 weeks ago
I think "root" + "uri" is also wrong. because when we have location "/delete" and uri "/delete/file.txt" we want filepath "{root}/file.txt" and not "{root}/delete/file.txt"
Changed it on my PathInfo branch. But does it make sense if we call delete on a location/dir uri="/directory/" that we delete index file if that location has one? I think its okay
how is it possible, that we delete index file?
Because if we call delete on uri="/dir/" we do our filepath checking and filepath will end up being "{root}/{indexfile}". And then we delete filepath
ah ok. yeah. I mean we can handle like this. but what happen if we get a delete request with uri /{root}/[anyfile.txt}, and we do not found this file? we are also deleting index?
Will be closed with #50
Should the deleteRequest function take the filepath string? Because if we have uri "/delete/" and we have an index file for that location should we first do our filepath stuff and have "{root}/index.file" and try to delete this file?
https://github.com/42Webserver/42-Vienna-Webserv/blob/9f11f972579caa4d947689053b2313e7e64787da/Response.cpp#L264-L282