added trim in utils, added parse request header, mv pdf in docs
This commit is contained in:
@@ -83,8 +83,8 @@ void Webserv::_insert_status_line(Client *client)
|
||||
void Webserv::_get_ressource(Client *client)
|
||||
{
|
||||
std::ifstream ifd; // For chunk, ifstream directly in struct CLient for multiples read without close() ?
|
||||
char buf[MAX_FILESIZE+1];
|
||||
char *tmp;
|
||||
char buf[MAX_FILESIZE+1];
|
||||
const char *tmp;
|
||||
|
||||
// Mini parsing à l'arrache du PATH
|
||||
std::string path;
|
||||
@@ -128,10 +128,8 @@ void Webserv::_get_ressource(Client *client)
|
||||
client->response.append("Content-Type: text/html; charset=UTF-8\r\n");
|
||||
|
||||
client->response.append("Content-Length: ");
|
||||
// tmp = ::ft_itoa(ifd.gcount());
|
||||
tmp = ::itoa(ifd.gcount());
|
||||
tmp = ::itoa(ifd.gcount()).c_str();
|
||||
client->response.append(tmp);
|
||||
// delete tmp;
|
||||
client->response.append("\r\n");
|
||||
|
||||
// Body
|
||||
|
||||
Reference in New Issue
Block a user