buglwIP - A Lightweight TCP/IP stack - Bugs: bug #59880, LWIP_HTTPD_CUSTOM_FILES...


You are not allowed to post comments on this tracker with your current authentication level.

bug #59880: LWIP_HTTPD_CUSTOM_FILES improvements

Submitter:  Mike Kleshov <kleshov>
Submitted:  Fri 15 Jan 2021 01:12:16 PM UTC
Category:  apps Severity:  2 - Minor
Item Group:  Change Request Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
lwIP version:  git head

Tue 26 Jan 2021 08:26:15 AM UTC, comment #5: 

BTW, it would probably make much sense to first add the function protoypes to fs.h (or httpd.h, just somewhere we know the current implementation of them includes). Right now, these functions are only declared in fs.c, but not in any header file.

Simon Goldschmidt <goldsimon>
Group administrator
Mon 25 Jan 2021 08:22:46 PM UTC, comment #4: 

I'm thinking along the lines of using a new name for the function with proper return values and reserving the old name for compatibility with legacy user code. A translation macro could be activated in this case.

Mike Kleshov <kleshov>
Group Member
Mon 25 Jan 2021 07:51:47 PM UTC, comment #3: 

I'm not sure, but it could be that changing the return value from 'int' to 'err_t' (which is s8_t by default) is enough (for all platforms where sizeof(int) > 1 that is...)

Simon Goldschmidt <goldsimon>
Group administrator
Mon 25 Jan 2021 07:50:04 PM UTC, comment #2: 

Good to know that we are in agreement.

Regarding fs_open_custom(), I'll see if I can come up with a solution that would be safe for users. I definitely would not want to rush anything.

Mike Kleshov <kleshov>
Group Member
Mon 25 Jan 2021 07:35:21 PM UTC, comment #1: 

1) I'm with you that this is unfortunate. However, regarding people's work to integrate upgrades: will this change break compiling after an upgrade? Because if it doesn't break compiling, most people won't notice they need to change something here...

2) Good idea. And I see you already pushed it.

Simon Goldschmidt <goldsimon>
Group administrator
Fri 15 Jan 2021 01:12:16 PM UTC, original submission:  

1) The return value of the function "fs_open_custom()" is inconsistent with that of "fs_open()". It makes sense to make it err_t and ERR_OK in case of success, again similar to "fs_open()".
2) There is no need for a separate flag field "is_custom_file" in "struct fs_file". The existing field "flags" with a new mask FS_FILE_FLAGS_CUSTOM can be used for this purpose.

Mike Kleshov <kleshov>
Group Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by kleshov (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-4e86.
    Corresponding source code