Http server can't download more than 1MB ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Http server can't download more than 1MB ?

Jump to solution
2,313 Views
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

Labels (1)
Tags (1)
1 Solution
611 Views
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;
  }
  ...

View solution in original post

2 Replies
610 Views
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 Kudos
612 Views
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;
  }
  ...