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-cgi.c
diff --git
a/package/uhttpd/src/uhttpd-cgi.c
b/package/uhttpd/src/uhttpd-cgi.c
index 2f7ea7afaa77f2b9a5cfe7bc29b7af2890b12694..5e445ca372521023ad9eba92952c56a4817ba13f 100644
(file)
--- a/
package/uhttpd/src/uhttpd-cgi.c
+++ b/
package/uhttpd/src/uhttpd-cgi.c
@@
-181,6
+181,10
@@
static bool uh_cgi_socket_cb(struct client *cl)
/* ... write to CGI 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 */