Http server can't download more than 1MB ?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Http server can't download more than 1MB ?

跳至解决方案
2,518 次查看
YodaC
Contributor III


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

标签 (1)
标记 (1)
1 解答
816 次查看
YodaC
Contributor III


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;
  }
  ...

在原帖中查看解决方案

2 回复数
815 次查看
YodaC
Contributor III


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.

0 项奖励
回复
817 次查看
YodaC
Contributor III


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;
  }
  ...