lwIP - A Lightweight TCP/IP stack - Bugs: bug #54814, httpd dynamic file read
You are not allowed to post comments on this tracker with your current authentication level.
bug #54814: httpd dynamic file read
Submitter: | Vua Hoa <vuahoa07> | ||
Submitted: | Wed 10 Oct 2018 04:15:44 AM UTC | ||
Category: | apps | Severity: | 3 - Normal |
Item Group: | Faulty Behaviour | Status: | Works For Me |
Privacy: | Public | Assigned to: | goldsimon |
Open/Closed: | Closed | Planned Release: | None |
lwIP version: | 2.1.0 |
Jump to the original submission
Tue 30 Oct 2018 08:15:27 PM UTC, comment #7: |
Simon Goldschmidt <goldsimon> |
Tue 30 Oct 2018 11:53:02 AM UTC, comment #6: I did use file->pextension. At first time using dynamic reading, I use 'file->pextention' to store request information (ex: uri) and use 'file->data' for response information (file handle, status...). But if 'file->data' not NULL, the read function is not called, so i have to group all information to 'pextension' only. Of course, we can add other fields to fs_file struct but this is informal.
|
Vua Hoa <vuahoa07> |
Tue 30 Oct 2018 08:25:49 AM UTC, comment #5: OK, then just use file->pextension, which is meant for what you want instead of file->data. |
Simon Goldschmidt <goldsimon> |
Tue 30 Oct 2018 08:20:50 AM UTC, comment #4: I want to use file->data to store File handle (in fs_open_custom) for later reading (used by fs_read_custom). Without that, i have to manage a http-request/file-handle mapping table. |
Vua Hoa <vuahoa07> |
Mon 29 Oct 2018 08:10:32 AM UTC, comment #3:
|
Simon Goldschmidt <goldsimon> |
Wed 10 Oct 2018 02:06:07 PM UTC, comment #2: First, sorry for the wrong comments, it should be 'fs_read_custom' instead of 'fs_open_custom'.
|
Vua Hoa <vuahoa07> |
Wed 10 Oct 2018 01:06:10 PM UTC, comment #1: So what's the bug here? Sending from file->data is perfectly valid if your custom open function supports it?
|
Simon Goldschmidt <goldsimon> |
Wed 10 Oct 2018 04:15:44 AM UTC, original submission:
Settings:
|
Vua Hoa <vuahoa07> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
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.
Follow 3 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2018-10-30 | goldsimon | Status | None | Works For Me | |
Assigned to | None | goldsimon | |||
Open/Closed | Open | Closed |
Powered by Savane 3.13-4448.
Corresponding source code
Yeah, well, you get one member for private data. If you need more, you need to allocate a struct.
There are files that can be fully created in the "open" callback. In this case, there's no need to call fs_read_custom.
file->data is what the httpd sends out. This could change in a rework that I am planning, but for now, it's like that. Feel free to post documentation update if this was misleading for you.