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:
@@ -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 ?
|
||||
|
||||
Reference in New Issue
Block a user