1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-07-01 00:49:51 +03:00

[package] uhttpd: add explicit stdin eof notification for Lua and CGI childs

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32027 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2012-06-02 14:56:24 +00:00
parent 35d604e713
commit f76b152928
3 changed files with 10 additions and 2 deletions

View File

@ -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 := \

View File

@ -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 */

View File

@ -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 */