buglwIP - A Lightweight TCP/IP stack - Bugs: bug #53339, HTTP Server SSI send, hs->left...

 
 

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

bug #53339: HTTP Server SSI send, hs->left ends up negative

Submitter:  Brad Lonergan <dasrue>
Submitted:  Tue 13 Mar 2018 11:17:58 PM UTC
   
 
Category:  apps Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Duplicate
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  git head

Thu 14 Jun 2018 07:51:30 PM UTC, comment #1: 

Actually, this is a duplicate to bug #50844 which is has been fixed nearly a year before you entered this bug and marked it as 'git head'. Really, I don't think 'git head' is the correct thing to chose for such an old version!

Simon Goldschmidt <goldsimon>
Group administrator
Tue 13 Mar 2018 11:17:58 PM UTC, original submission:  

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.

Brad Lonergan <dasrue>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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 goldsimon (Updated the item)
  • -email is unavailable- added by dasrue (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-06-14 goldsimon StatusNone Duplicate
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
        Planned Release2.1.0 None
    2018-06-12 goldsimon Planned ReleaseNone 2.1.0

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code