[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #59728] SSI tag expansion in HTTPD breaks if nothing f
From: |
Mike Kleshov |
Subject: |
[lwip-devel] [bug #59728] SSI tag expansion in HTTPD breaks if nothing follows the tag in a file |
Date: |
Mon, 28 Dec 2020 23:40:28 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0 |
Update of bug #59728 (project lwip):
Status: None => Ready For Test
_______________________________________________________
Follow-up Comment #2:
Proposed fix, tested in my setup:
diff --git a/trunk/src/apps/http/httpd.c b/trunk/src/apps/http/httpd.c
--- a/trunk/src/apps/http/httpd.c (revision 6988)
+++ b/trunk/src/apps/http/httpd.c (working copy)
@@ -1610,6 +1610,11 @@
}
#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */
+#if LWIP_HTTPD_SSI
+ if (hs->ssi && (hs->ssi->tag_state == TAG_SENDING)) {
+ /* nothing */
+ } else
+#endif
/* Have we run out of file data to send? If so, we need to read the next
* block from the file. */
if (hs->left == 0) {
@@ -1621,6 +1626,9 @@
#if LWIP_HTTPD_SSI
if (hs->ssi) {
data_to_send = http_send_data_ssi(pcb, hs);
+ if (hs->ssi->tag_state == TAG_SENDING) {
+ return data_to_send;
+ }
} else
#endif /* LWIP_HTTPD_SSI */
{
_______________________________________________________
Reply to this item at:
<https://savannah.nongnu.org/bugs/?59728>
_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/