MIME types map for correct Content-type header

+ append body to string cause encoding problem, so added temp buf in Client.
This commit is contained in:
LuckyLaszlo
2022-08-05 04:24:15 +02:00
parent 3102253092
commit e596d8f093
19 changed files with 432 additions and 312 deletions

View File

@@ -17,6 +17,7 @@ struct Request
std::string body;
};
# define MAX_FILESIZE 1000000 // (1Mo)
class Client
{
public:
@@ -28,6 +29,8 @@ class Client
int fd;
std::string raw_request;
std::string response;
static char buf[MAX_FILESIZE+1];
size_t body_size;
unsigned int status;
// const functions ?