-
Andy Green authored
This gets rid of the stack buffer while serving files, and the PATH_MAX char array that used to hold the filepath in the wsi. It holds an extra file descriptor open while serving the file, however it attempts to stuff the socket with as much of the file as it can take. For files of a few KB, that typically completes (without blocking) in the call to libwebsockets_serve_http_file() and then closes the file descriptor before returning. Signed-off-by:
Andy Green <andy.green@linaro.org>
Andy Green authoredThis gets rid of the stack buffer while serving files, and the PATH_MAX char array that used to hold the filepath in the wsi. It holds an extra file descriptor open while serving the file, however it attempts to stuff the socket with as much of the file as it can take. For files of a few KB, that typically completes (without blocking) in the call to libwebsockets_serve_http_file() and then closes the file descriptor before returning. Signed-off-by:
Andy Green <andy.green@linaro.org>