lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] http post and connection not closed problem


From: address@hidden
Subject: Re: [lwip-devel] http post and connection not closed problem
Date: Tue, 27 Oct 2009 21:40:41 +0100
User-agent: Thunderbird 2.0.0.23 (Macintosh/20090812)

Hi Stephane,

from looking at your capture, it seems that neither bug #26672 nor the close/shutdown is your problem but rather a simple bug in tcp.h (which is fixed in CVS head, but for which I unfortunately didn't create an own bug entry). If you can't update to CVS head from october 26th, make sure the definition of TCP_EVENT_RECV() in tcp.h, around line 486 looks like this:

#define TCP_EVENT_RECV(pcb,p,err,ret)                           \
 do {                                                          \
   if((pcb)->recv != NULL) {                                   \
     (ret) = (pcb)->recv((pcb)->callback_arg,(pcb),(p),(err)); \
   } else {                                                    \
     (ret) = ERR_OK;                                           \
     if (p != NULL) {                                          \
       tcp_recved((pcb), ((struct pbuf*)(p))->tot_len);        \
       pbuf_free(p);                                           \
     }                                                         \
   }                                                           \
 } while (0)

The call to tcp_recved was missing. This leads to closing and failing to reopen the window when pcb->recv is set to NULL (i.e. when calling tcp_recv(pcb, NULL)) and the client is still sending data.

Hope that helps,
Simon



Stephane Lesage wrote:
Hi,
I wrote an http server in my embedded device (using sockets)
and sometimes I have a problem when uploading a big file (new firmware).
The web browser hangs (IE or FF on WinXP).

Looking at the IE capture, I can see:
- my device sends a HTTP 400 Bad Request response (packets 193, 194) (which is 
certainly a bug from me)
- closes the connection (packet 196)
- the web browser has not yet finished sending the POST data and tries to 
continue
- infinite loop with ZeroWindowProbe / ZeroWindow
In the FF capture:
- I don't see my device response
- infinite loop with RST,ACK from my device and TCP retransmission from the PC
I think the connection should be closed and the browser should display an error message.
Am I right ?
Can this be related to bug 26672 ?
Or is it the close/shutdown problem ?

Capture files are here:
http://www.ateis-international.com/downloads/temp/
--
Stéphane LESAGE
ATEIS International


_______________________________________________
lwip-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-devel






reply via email to

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