Closed GoogleCodeExporter closed 9 years ago
Some of the code I missed to post in previous thread:
void WebServer::ThreadProcess()
{
struct mg_context *ctx;
try
{
ctx = mg_start();
mg_set_option(ctx, "ports", "8080");
mg_set_auth_callback(ctx, "/*", &WebServer::Process, NULL);
for (;;)
{
Sleep(1000);
}
}
catch(const char* err)
{
delete[] (char*) err;
}
catch(...)
{
cout << "######## Some Other Error in WebServer..\n";
}
mg_stop(ctx);
}
Original comment by asharud...@gmail.com
on 19 Feb 2010 at 12:06
Hi,
It seems the MAX_REQUEST_SIZE cause this issue. By default it is set to 8192. I
have
changed it to 65536 and seems work now.
However, I will confirm it once again and update this thread tomorrow.
thanks.
Original comment by asharud...@gmail.com
on 19 Feb 2010 at 3:41
Hi,
I tried several times.
After changing the buffer size it seems to be work. However, sometime I face
the same
issue occasionally.
Anybody face this issue? or any fix for this issue.
Thanks in Advance.
Original comment by asharud...@gmail.com
on 22 Feb 2010 at 10:19
Hi,
After analyzing the code, I found the issue.. Only with multiple read we can
get the
actual data from the socket.. I have modified the code and attached my
mongoose.c
file with this comment.
By using this fix, I can read large data and receive data without any issue.
You can refer the fix from the attached file:
Modified functions are,
1. mg_printf (Dynamically allocate size based on the data.)
2. read_request (Modified for multiple socket read)
3. process_new_connection (Modified for multiple socket read)
Thanks,
Original comment by asharud...@gmail.com
on 8 Mar 2010 at 1:42
Attachments:
Thanks, I'll take a look.
Original comment by valenok
on 8 Mar 2010 at 9:51
Obsoleted by 2.9.
POST data must be read by user.
Original comment by valenok
on 7 Sep 2010 at 8:47
Original issue reported on code.google.com by
asharud...@gmail.com
on 19 Feb 2010 at 11:35Attachments: