buglwIP - A Lightweight TCP/IP stack - Bugs: bug #50892, lwip send HTTP/1.0 200 OK with...

 
 

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

bug #50892: lwip send HTTP/1.0 200 OK with content length 0 and content of file which cause FIN, ACK from browser

Submitter:  Dmitry <gdi>
Submitted:  Fri 28 Apr 2017 12:08:52 PM UTC
   
 
Category:  TCP Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Invalid
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  git head

Fri 28 Apr 2017 06:32:02 PM UTC, comment #5: 

Good to know.

Simon Goldschmidt <goldsimon>
Group administrator
Fri 28 Apr 2017 01:56:14 PM UTC, comment #4: 

I've updated with the last HEAD revision and now it looks like its fixed as you mentioned. Thanks.

Dmitry <gdi>
Fri 28 Apr 2017 12:19:52 PM UTC, comment #3: 


> content length 0


Updated the summary.

In that case, I had introduced a bug in 'lwip_itoa()' some days ago that should be fixed now. Your (unreleased) version "2.0.3b" tells me you might happen to run the buggy code? Try upgrading to git master again.

Simon Goldschmidt <goldsimon>
Group administrator
Fri 28 Apr 2017 12:13:48 PM UTC, comment #2: 

Please provide full pcap files instead of pre-analyzed logs.
Then, it helps if you add packet numbers to your description (i.e. RST is packet number #123 in file xyz.pcap).

Simon Goldschmidt <goldsimon>
Group administrator
Fri 28 Apr 2017 12:11:28 PM UTC, comment #1: 

Sorry, the title of this issue should be 'lwip send HTTP/1.0 200 OK with content length 0 and remaining content of file in one TCP send which cause [ACK],[FIN, ACK] from browser'.

Dmitry <gdi>
Fri 28 Apr 2017 12:08:52 PM UTC, original submission:  

I'm trying to upgrade lwip 1.4.1 to 2.0.x with httpserver_raw and got strange behavior. I can't receive full file data it cut somewhere in the muddle. I use the same device with same web files, I just compile lwip 1.4.1 or 2.0.3b. So 1.4.1 works fine, but 2.0.3b fails.
I use FatFs on SD card to store files and set LWIP_HTTPS_DYNAMIC_FILE_READ = 1
Please see in attached files the Wireshark logs. Where are the same file transfer, 'good*' files captured on lwip 1.4.1, 'wrong*' files from 2.0.3b.
I observed that on 2.0.3b the server sends 'HTTP/1.0 200 OK' answer and a part of file in one TCP send and looks like this caused browser to send ACK, then FIN, ACK. And after that browser sends RST on following file chinks while lwip continue send file chunks. Lwip 1.4.1 doesn't send '200 ok' answer right after GET request, but just send file chunks and send '200 OK' only after file was send.
So can anybody help me to fox this issue?
Lwip is a 192.168.0.141 host, the 192.168.0.112 is a Linux PC station with Firefox browser.

Dmitry <gdi>

 

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

Attached Files
file #40525:  good-short.txt added by gdi (10KiB - text/plain)
file #40526:  good.txt added by gdi (113KiB - text/plain)
file #40527:  wrong-short.txt added by gdi (13KiB - text/plain)
file #40528:  wrong.txt added by gdi (168KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by gdi (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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-04-28 goldsimon StatusNone Invalid
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2017-04-28 goldsimon Summarylwip send HTTP/1.0 200 OK with content length and content of file which cause FIN, ACK from browser lwip send HTTP/1.0 200 OK with content length 0 and content of file which cause FIN, ACK from browser
    2017-04-28 gdi Attached File- Added good-short.txt, #40525
        Attached File- Added good.txt, #40526
        Attached File- Added wrong-short.txt, #40527
        Attached File- Added wrong.txt, #40528

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code