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

Submitted by:  Dmitry <gdi>
Submitted on:  Fri 28 Apr 2017 12:08:52 PM UTC  
 
Category: TCPSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Invalid
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: git head

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

Good to know.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>

 

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
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by gdi (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 28 Apr 2017 06:32:02 PM UTCgoldsimonStatusNone=>Invalid
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed
    Fri 28 Apr 2017 12:19:52 PM UTCgoldsimonSummarylwip 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
    Fri 28 Apr 2017 12:08:52 PM UTCgdiAttached 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.1-cleanup1