mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-19 12:38:19 +00:00
The webserver/httpd app is currently broken when script support is enabled (CONFIG_NETUTILS_HTTPD_SCRIPT_DISABLE). The root cause has been tracked down to the "Content-length" not being available ahead of time in this case (length of -1 passed to send_headers() ). On the other hand, the server closing the socket does not result in FIN being sent to the browser either (FIN not supported by NuttX yet). Simple solution: Add support for HTTP Chunked Encoding to webserver/httpd (attached patch). The attached patch is simple. It adds a configuration option to enable chunked encoding. When enabled, the implementation will auto-detect the cases where content length is not available ahead of time, and will automatically engage chunked encoding transfers. Without this patch, the browser/client hangs forever, as it is expecting more data. With this patch, the browser displays the content. |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| httpd.c | ||
| httpd.h | ||
| httpd_cgi.c | ||
| httpd_cgi.h | ||
| httpd_fs.c | ||
| httpd_mmap.c | ||
| httpd_sendfile.c | ||
| Kconfig | ||
| Make.defs | ||
| Makefile | ||