|
From: | Vua Hoa |
Subject: | [lwip-devel] [bug #54814] httpd dynamic file read |
Date: | Wed, 10 Oct 2018 00:15:45 -0400 (EDT) |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0 |
URL: <https://savannah.nongnu.org/bugs/?54814> Summary: httpd dynamic file read Project: lwIP - A Lightweight TCP/IP stack Submitted by: vuahoa07 Submitted on: Wed 10 Oct 2018 04:15:44 AM UTC Category: apps Severity: 3 - Normal Item Group: Faulty Behaviour Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Planned Release: None lwIP version: 2.1.0 _______________________________________________________ Details: Settings: LWIP_HTTPD_CUSTOM_FILES = 1 LWIP_HTTPD_DYNAMIC_FILE_READ = 1 The httpd/fs still send data directly from file->data buffer after fs_open_custom(...) instead of calling fs_read_custom (to feed a chunk of file). I have to set file->data = NULL (inside fs_open_custom) to make http call fs_read_custom: int fs_open_custom(struct fs_file *file, const char *name) { ... open file... /* file->data = (const char *)p_web->buf_ptr; -> will not call 'fs_open_custom' */ file->data = NULL; // Will call 'fs_open_custom' file->len = p_web->size; file->index = 0; file->pextension = p_web->buf_ptr; file->flags = FS_FILE_FLAGS_HEADER_INCLUDED; return 1; } _______________________________________________________ Reply to this item at: <https://savannah.nongnu.org/bugs/?54814> _______________________________________________ Message sent via Savannah https://savannah.nongnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |