lwip-devel
[Top][All Lists]
Advanced

[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 09:08:06 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0

Follow-up Comment #1, bug #59728 (project lwip):

Trying to narrow it down.
The problem occurs when LWIP_HTTPD_SSI_MULTIPART is enabled. Apparently, the
function http_send() can decide that it has sent all the data when in fact a
tag was not expanded completely:

#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)) { *<<< THIS
CONDITION TRIGGERS EVEN THOUGH TAG EXPANSION IS NOT COMPLETE*
    /* 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;
  }

Apparently, the condition highlighted above should be corrected.

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?59728>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]