Moved most request errors check in Client
+ bugfix of "Bad file descriptor" due to empty operator=() in Client + added a condition in _determine_location_COOP_FIX() + udpate memo.txt + need fix for index/autoindex (location "/list" dont work)
This commit is contained in:
@@ -109,16 +109,15 @@ void Webserv::_get_file(Client *client, const std::string &path)
|
||||
}
|
||||
else
|
||||
{
|
||||
std::streampos size = ifd.tellg();
|
||||
|
||||
// WIP : Chunk or not chunk (if filesize too big)
|
||||
/* std::streampos size = ifd.tellg();
|
||||
// WIP Low priority : Chunk or not chunk (if filesize too big)
|
||||
if (size > MAX_FILESIZE)
|
||||
{
|
||||
// Then chunk
|
||||
client->status = 500; // WIP temp
|
||||
std::cerr << "File too large for non chunk body\n";
|
||||
return ;
|
||||
}
|
||||
} */
|
||||
|
||||
ifd.seekg(0, std::ios::beg);
|
||||
buf << ifd.rdbuf();
|
||||
|
||||
Reference in New Issue
Block a user