Submitted bug report on 404 missing issue.

Could you provide some guidance on why the fsdata.c I generated with 
makefsfile.exe including headers is causing a "HTTP headers not included in 
file system" error?

>makefsfile.exe -i fs -v
makefsfile - Generate a file containing a file system image.
Copyright (c) 2008-2012 Texas Instruments Incorporated.  All rights reserved.

Input directory:   fs
Output file:       fsdata.c
Output format:     ASCII C
Overwrite output?: No
Exclude headers?:  No
Exclude file:      None

Excluding the following files and directory names:
  .svn
  CVS
  thumbs.db
  filelist.txt
  dirlist.txt

File fsdata.c exists. Overwrite? y
Opening output file fsdata.c
Changing to directory fs
Excluding .
Excluding ..
Processing fs/404.html...
Final filename is /404.html
Filtered filename is _404_html
File extension is html.
File extension found. Header is:
Content-type: text/html

Changing to directory fs/img
Excluding .
Excluding ..
Processing fs/img/sics.gif...
Final filename is /img/sics.gif
Filtered filename is _img_sics_gif
File extension is gif.
File extension found. Header is:
Content-type: image/gif

Processing fs/index.html...
Final filename is /index.html
Filtered filename is _index_html
File extension is html.
File extension found. Header is:
Content-type: text/html

Completed successfully. 3 files from 2 directories processed.
Binary size 3461 (0x00000d85) bytes



-----Original Message-----
From: lwip-users <lwip-users-bounces+ms=ppsystems....@nongnu.org> On Behalf Of 
goldsi...@gmx.de
Sent: Tuesday, April 2, 2019 2:45 PM
To: Mailing list for lwIP users <lwip-users@nongnu.org>
Subject: Re: [lwip-users] makefs and mem_free errors

Am 02.04.2019 um 20:39 schrieb Mike Spenard:
> Correct, I misspoke... I simply meant 'generated' fsdata.c rather than 
> compiled.
>
> I traced the "mem_free: mem->used" bomb out to the 404.html missing 
> from fsdata.c The http_get_404_file() function checks for it missing:
>
>       if (err != ERR_OK) {
>          /* 404.htm doesn't exist either. Indicate to the caller that 
> it should
>           * send back a default 404 page.
>           */
>          *uri = NULL;
>          return NULL;
>
> ...however, http_find_file() doesn’t have any code to properly handle 
> that
> NULL:

Hmm, that might still be missing in HEAD, too. I never checked, I guess.

>
>      } else {
>        file = http_get_404_file(hs, &uri);
>      }
>
> I assume this is why I end up with a pbuf structure of heap allocated 
> by never flagged as Used. Which causes free_mem() to bomb out  ...?

Might be.

>
> I'm a new player here, so has this been fixed in newer code than NXP 
> provided me with? Or am I misunderstanding things?

No, seems to be in here still. We had some handling for a compiled-in default 
404 page, don't know what happened to that.

Would you mind filing a bug so that this doesn't get forgotten?

Regards,
Simon

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


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

Reply via email to