lwip-users
[Top][All Lists]
Advanced

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

Re: Re: [lwip-users] Problem with multi file sending http server


From: Kieran Mansley
Subject: Re: Re: [lwip-users] Problem with multi file sending http server
Date: Fri, 26 Nov 2010 16:18:19 +0000

On Fri, 2010-11-26 at 16:56 +0100, Mariusz Dz wrote:
> I used the Wireshark (some time spand to learn baisics of program),
> recomended by Kieran Mansley, and now i can describe in what exactly the
> problem is. I ask by web browser for html file, in html i have got some
> source to .css .js .gif for which browser ask and now http server on lwIP
> send first file then second, in first file somwhere in middle is about 100
> bytes of second file, that 100 bytes are second end file data. That what can
> i say after first carefully look what exactly is sending.

Looking at the code extracts you've given I suspect something like this
is happening:

1) browser sends first request
2) server calls http_recv() which starts to send first file in reply and
stores state in the "hs" structure
3) browser sends second request
4) server calls http_recv() which starts to send second file in reply
and overwrites the state in the hs structure
5) http_sent gets called for the first request and looks at the hs
structure; it finds state relating to the second file and sends some of
that.

i.e. I think your problem is in handling overlapping requests from the
server when you haven't finished sending the first one.

Kieran




reply via email to

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