buglwIP - A Lightweight TCP/IP stack - Bugs: bug #48444, httpd does not support persistent...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #48444: httpd does not support persistent connections for SSI files

Submitted by:  Simon Goldschmidt <goldsimon>
Submitted on:  Fri 08 Jul 2016 10:32:53 AM UTC  
 
Category:  None Severity:  3 - Normal
Item Group:  Feature Request Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
lwIP version:  git head

Thu 27 Dec 2018 08:52:50 AM UTC, comment #2:

Re comment #1: unless I'm mistaken, this has absolutely nothing to do with this bug (please read the summary!)

If you have a bug report, please don't reuse existing bugs by posting off-topic things. Thanks.

Simon Goldschmidt <goldsimon>
Project Administrator
Thu 27 Dec 2018 06:13:38 AM UTC, comment #1:

The implementation of the httpd application using enc28j60 found that the outgoing file was incomplete.
(Same code, did not appear when using dp83848)

When data__index_html[] is transmitted, the TCP connection ends actively.

The modification method is to add the following code in the <httpd.c> "http_send" function.

If(data_to_send == 0)

The specific location added is at line 1613.

//----- --------------------------Original code:
#if LWIP_HTTPD_SSI
if (hs->ssi) {
data_to_send = http_send_data_ssi(pcb, hs);
} else
#endif /* LWIP_HTTPD_SSI */
{
data_to_send = http_send_data_nonssi(pcb, hs);
}

if ((hs->left == 0) && (fs_bytes_left(hs->handle) <= 0)) {
/* We reached the end of the file so this request is done.
* This adds the FIN flag right into the last data segment. */
LWIP_DEBUGF(HTTPD_DEBUG, ("End of file.\n"));
http_eof(pcb, hs);
return 0;
}

//----------------------------- Modified code:
#if LWIP_HTTPD_SSI
if (hs->ssi) {
data_to_send = http_send_data_ssi(pcb, hs);
} else
#endif /* LWIP_HTTPD_SSI */
{
data_to_send = http_send_data_nonssi(pcb, hs);
}
if(data_to_send == 0) //add code
if ((hs->left == 0) && (fs_bytes_left(hs->handle) <= 0)) {
/* We reached the end of the file so this request is done.
* This adds the FIN flag right into the last data segment. */
LWIP_DEBUGF(HTTPD_DEBUG, ("End of file.\n"));
http_eof(pcb, hs);
return 0;
}

yang guiming <yanggm>
Fri 08 Jul 2016 10:32:53 AM UTC, original submission:
Simon Goldschmidt <goldsimon>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by yanggm (Posted a comment)
  • -email is unavailable- added by goldsimon (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.4