lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] lwip 1.4.1 and HTTPD Server Duplicating HTTP Header Fie


From: address@hidden
Subject: Re: [lwip-users] lwip 1.4.1 and HTTPD Server Duplicating HTTP Header Fields in Body
Date: Mon, 13 May 2019 20:01:37 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Am 13.05.2019 um 14:51 schrieb Lee:
Hello,
I am new to embedded IP products and working with a Texas Instruments
reference design / example and have found or made a bug.
The hardware platform is a TIVA TM4C1294 and we are using a Launchpad as
a starting point for our design and I have duplicated the problem on a
TM4C1294XL Launchpad.
We started with the Tivaware version: TivaWare_C_Series-2.1.1.71
This library has the lwip 1.4.1 rtos and an httpserver_raw for which I
do not see a version but the files from the zip down load are dated
12/23/2015.
We started with an example project TI calls “enet_s2e” which provides a
GUI on a web server which uses a combination of CSS and Javascrip to
make a menu system of web pages that we have only slightly modified.
Our modifications cause the web pages to some times load with errors
breaking the menu system design.  The embedded server becomes messed up
and starts serving files with the HTTP header fields duplicated in the
document body. When this happens to for example, the index.htm file we
see text “HTTP/1.0 200 OK\r\n” in the GUI.

Honestly, this text is far too long to keep me reading. But the picture
in the TI forum better shows what you problem is.

Not the the headers are *not* duplicated! The actual header says
"lwIP/1.3.1" where the page contains "lwIP/1.3.2".

Your problem is probably that the generated page struct (in fs_data.c)
contains HTTP headers but doesn't tell the server it already contains
those headers and so the server adds these headers again (on sending).

Seem like you're using some kind of messed up version or configuration
mix of 'makefsdata' vs. httpd...

Regards,
Simon

  When the error happens to
the JavaScript files the JavaScript functions do not work and the web
page navigation dependent on them fails.  A processor reset clears the
problem for a wile but with continued navigation the problem returns
eventually.
I observed the duplicate information with wire shark and by pressing F12
in Firefox and examining the web page and the style sheet which is also
some times messed up.  As far as I can tell the original reference
example design from TI never serves incorrectly.
I have made a very simple change to the TI reference design example and
reproduced the error.
There is an image of microcontroller in the upper left of the web GUI
and I changed just enough code so that that image was a link back to the
index.htm file of the GUI.   I tried this a couple of ways and the
server still becomes messed up and starts serving the files in error.  I
have not found an exact and minimal way to make the server mess up but
usually after < 10 or 20 clicks on a link it happens.
To duplicate the problem, I made a web page file (index.htm” with this
simple content:

    <!DOCTYPE HTML>
    <!-- Copyright (c) 2014-2015 Texas Instruments Incorporated.  All
    rights reserved. -->
    <html>
       <head>
         <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
         <title>EK-TM4C1294XL Evaluation Kit</title>
         <link rel="stylesheet" type="text/css" href="styles.css"/>
         <link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
         <script src="javascript.js" language="JavaScript1.2"
    charset="utf-8"></script>
         <script src="javascript_load.js" language="JavaScript1.2"
    charset="utf-8"></script>
       </head>
       <body>
       Some Text
       <br>
       A link <a href="index.htm" > Click here </a>
       <br>
       That is all.
       Some Text
       </body>
    </html>

This file also can cause the server to mess up.
Replacing “  A link <a href="index.htm" > Click here </a>” with “  A
link <a href="/" > Click here </a>” also messes up.
I documented my efforts with wireshark files and  screen shots at the TI
E2E forum as I was learning the causes of the problem. See:
https://e2e.ti.com/support/microcontrollers/other/f/908/p/799725/2961889#2961889
Any ideas what I should investigate next?
Is there a simple way I can make a web server on my PC with out the
embedded system where I could try to run lwip 1.4.1 and the httpd server
and try to duplicate the problem or is there a better way in my embedded
target to proceed?
Thanks for any suggestions.

+++++++++++++++
Lee Erickson
Spectrum Techniques LLC.
address@hidden

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





reply via email to

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