projects
/
openwrt
/
svn-archive
/
archive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[package] uhttpd: add explicit stdin eof notification for Lua and CGI childs
[openwrt/svn-archive/archive.git]
/
package
/
uhttpd
/
src
/
uhttpd-lua.c
diff --git
a/package/uhttpd/src/uhttpd-lua.c
b/package/uhttpd/src/uhttpd-lua.c
index 7d602f7c585efce0ca6b99e8619003512368894e..e8d932b47b4246affc58db0d68f7cc71aeb0b125 100644
(file)
--- 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;
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);
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 */
}
/* try to read data from child */