X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=package%2Fuhttpd%2Fsrc%2Fuhttpd-lua.c;fp=package%2Fuhttpd%2Fsrc%2Fuhttpd-lua.c;h=e8d932b47b4246affc58db0d68f7cc71aeb0b125;hp=7d602f7c585efce0ca6b99e8619003512368894e;hb=065d5144e4384818fcfd7689816b702262804fd5;hpb=71353d2c38afc2643da6cf3fcb5f699962c8dd7d diff --git a/package/uhttpd/src/uhttpd-lua.c b/package/uhttpd/src/uhttpd-lua.c index 7d602f7c58..e8d932b47b 100644 --- a/package/uhttpd/src/uhttpd-lua.c +++ b/package/uhttpd/src/uhttpd-lua.c @@ -298,9 +298,13 @@ static bool uh_lua_socket_cb(struct client *cl) else state->content_length = 0; - /* ... write to CGI process */ + /* ... write to Lua process */ len = uh_raw_send(state->wfd, buf, len, cl->server->conf->script_timeout); + + /* explicit EOF notification for the child */ + if (state->content_length <= 0) + close(state->wfd); } /* try to read data from child */