Hi all
With MQX http server, the download stop to nearly 1MB
If the file is downloaded from the MQX ftp server, the download is complete.
MQX version is 3.5
Is somebody had this problem to ?
Is there any parameters to correct this ?
Thanks
Solved! Go to Solution.
I think it is a bug in MQX.
During download the time of the session (session->time) of each block sent never change.
So a timeout occurs after HTTPDCFG_SES_TO ms. (default = 20000 ms)
HTTPDCFG_SES_TO is in Freescale MQX 3.5\rtcs\source\httpd\httpd_cnfg.h
I change this value to 360000, rebuilt RTCS and now it's works.
But i think it's not a good method.
Part of the code in httpd.c where timeout occurs:
void httpd_ses_process(HTTPD_STRUCT *server, HTTPD_SESSION_STRUCT *session) {
HTTPD_TIME_STRUCT time;
HTTPD_ASSERT(server && session);
if (HTTPD_SESSION_VALID == session->valid)
{
// check timeout
HTTPD_GET_TIME(&time);
if (HTTPD_DIFF_TIME_MS(session->time, time) > HTTPDCFG_SES_TO) {
HTTPD_DEBUG(1, "session %p timeout\n", session);
session->state = HTTPD_SES_CLOSE;
}
...
I only want to know if it is a bug or a bad setup of HTTP server.
Nobody use download from HTTP server ?
Nobody can answer me ?
Please.
I think it is a bug in MQX.
During download the time of the session (session->time) of each block sent never change.
So a timeout occurs after HTTPDCFG_SES_TO ms. (default = 20000 ms)
HTTPDCFG_SES_TO is in Freescale MQX 3.5\rtcs\source\httpd\httpd_cnfg.h
I change this value to 360000, rebuilt RTCS and now it's works.
But i think it's not a good method.
Part of the code in httpd.c where timeout occurs:
void httpd_ses_process(HTTPD_STRUCT *server, HTTPD_SESSION_STRUCT *session) {
HTTPD_TIME_STRUCT time;
HTTPD_ASSERT(server && session);
if (HTTPD_SESSION_VALID == session->valid)
{
// check timeout
HTTPD_GET_TIME(&time);
if (HTTPD_DIFF_TIME_MS(session->time, time) > HTTPDCFG_SES_TO) {
HTTPD_DEBUG(1, "session %p timeout\n", session);
session->state = HTTPD_SES_CLOSE;
}
...