Skip to content
Snippets Groups Projects
  • Andy Green's avatar
    b8b247d3
    remove need for filepath buffer on http file serve · b8b247d3
    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: default avatarAndy Green <andy.green@linaro.org>
    b8b247d3
    History
    remove need for filepath buffer on http file serve
    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: default avatarAndy Green <andy.green@linaro.org>