lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] mini web server bug


From: Guillaume Fortaine
Subject: [lwip-users] mini web server bug
Date: Mon, 27 Feb 2012 23:55:01 +0100

Hello,

For your information :

http://forum.chibios.org/phpbb/viewtopic.php?p=2758#p2758

"The driver works and the lwIP demo works too but I am hitting a
strange problem with lwIP, in the mini web server (web.c) the
following code fails:

CODE: SELECT ALL
static const char http_index_html[] =
"<html><head><title>Congrats!</title></head><body><h1>Welcome to our
lwIP HTTP server!</h1><p>This is a small test page.</body></html>";
...
      /* Send our HTML page */
      netconn_write(conn, http_index_html, sizeof(http_index_html)-1,
NETCONN_NOCOPY);


Apparently netconn_write() only sends the first 128 bytes of the
string (which is 133 bytes long), the web browser receives an
incomplete page. The error is not inside the driver because the AT91
driver and demo does exactly the same. It appears that lwIP prepares
an incomplete pbufs chain for that string, the last element of the
chain is missing for some reason, the driver sends the pbufs chain as
it receives it: incomplete.

Any idea about the possible cause? lwIP bug? lwIP configuration error?
integration problem?

Giovanni"

We look forward to your answer,

Best Regards,

Guillaume FORTAINE



reply via email to

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