diff options
Diffstat (limited to 'package')
-rw-r--r-- | package/uhttpd/Makefile | 2 | ||||
-rw-r--r-- | package/uhttpd/src/uhttpd-cgi.c | 4 | ||||
-rw-r--r-- | package/uhttpd/src/uhttpd-lua.c | 6 |
3 files changed, 10 insertions, 2 deletions
diff --git a/package/uhttpd/Makefile b/package/uhttpd/Makefile index 13da14dfe9..9d8f9fa95d 100644 --- a/package/uhttpd/Makefile +++ b/package/uhttpd/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uhttpd -PKG_RELEASE:=34 +PKG_RELEASE:=35 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) PKG_CONFIG_DEPENDS := \ diff --git a/package/uhttpd/src/uhttpd-cgi.c b/package/uhttpd/src/uhttpd-cgi.c index 2f7ea7afaa..5e445ca372 100644 --- 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 */ 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 */ |