lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #53339] HTTP Server SSI send, hs->left ends up negativ


From: Brad Lonergan
Subject: [lwip-devel] [bug #53339] HTTP Server SSI send, hs->left ends up negative
Date: Tue, 13 Mar 2018 19:17:59 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36

URL:
  <http://savannah.nongnu.org/bugs/?53339>

                 Summary: HTTP Server SSI send, hs->left ends up negative
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: dasrue
            Submitted on: Tue 13 Mar 2018 11:17:58 PM UTC
                Category: apps
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: git head

    _______________________________________________________

Details:

I have noticed an issue with the HTTP server, sending when
LWIP_HTTPD_DYNAMIC_FILE_READ is enabled, and LWIP_HTTPD_SSI_INCLUDE_TAG is
disabled, and the SSI tag start is right at the end of the read data buffer.

I think the issue is to do with the part below the big while loop in
http_send_data_ssi assuming that all the data prior to the SSI opening has
been sent, but http_write does not necessarily transmit it all.

I fixed the issue by changing line 1237 of httpd.c from:
if(altcp_sndbuf(pcb) == 0) {
to:
if(data_to_send) {

This works for my use case, but I'm unsure if that is the correct solution.




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?53339>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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