remove need for filepath buffer on http file serve 28/3028/1
authorAndy Green <andy.green@linaro.org>
Mon, 21 Jan 2013 23:20:08 +0000 (07:20 +0800)
committerKevron Rees <kevron_m_rees@linux.intel.com>
Thu, 7 Mar 2013 21:01:32 +0000 (13:01 -0800)
commitc76c9195e639b24fb5290f2859aeb12ccea564a5
treee40be65a2b3a2e3639a001828410157008f97c1f
parentcd3e66c5328384da114087533973631097ebba98
remove need for filepath buffer on http file serve

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>
lib/libwebsockets.c
lib/output.c
lib/private-libwebsockets.h
lib/server.c
libwebsockets-api-doc.html
test-server/test-server.c