[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #48444] httpd does not support persistent connections
From: |
yang guiming |
Subject: |
[lwip-devel] [bug #48444] httpd does not support persistent connections for SSI files |
Date: |
Thu, 27 Dec 2018 01:13:39 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 |
Follow-up Comment #1, bug #48444 (project lwip):
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;
}
_______________________________________________________
Reply to this item at:
<https://savannah.nongnu.org/bugs/?48444>
_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/
- [lwip-devel] [bug #48444] httpd does not support persistent connections for SSI files,
yang guiming <=