HttpRequest req(logprefix);
HttpResponse resp;
+ resp.max_response_size=d_maxbodysize;
ComboAddress remote;
string reply;
try {
YaHTTP::AsyncRequestLoader yarl;
yarl.initialize(&req);
+ req.max_request_size=d_maxbodysize;
int timeout = 5;
client->setNonBlocking();
try {
while(!req.complete) {
int bytes;
- char buf[1024];
+ char buf[16000];
bytes = client->readWithTimeout(buf, sizeof(buf), timeout);
if (bytes > 0) {
string data = string(buf, bytes);
WebServer::WebServer(const string &listenaddress, int port) :
d_listenaddress(listenaddress),
d_port(port),
- d_server(nullptr)
+ d_server(nullptr),
+ d_maxbodysize(2*1024*1024)
{
}