mirror of https://github.com/hak5/openwrt-owl.git
uhttpd: add explicit stdin eof notification for Lua and CGI childs
SVN-Revision: 32027owl
parent
2b4ef2eafa
commit
2cf72776d8
|
@ -8,7 +8,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=uhttpd
|
PKG_NAME:=uhttpd
|
||||||
PKG_RELEASE:=34
|
PKG_RELEASE:=35
|
||||||
|
|
||||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||||
PKG_CONFIG_DEPENDS := \
|
PKG_CONFIG_DEPENDS := \
|
||||||
|
|
|
@ -181,6 +181,10 @@ static bool uh_cgi_socket_cb(struct client *cl)
|
||||||
/* ... write to CGI process */
|
/* ... write to CGI process */
|
||||||
len = uh_raw_send(state->wfd, buf, len,
|
len = uh_raw_send(state->wfd, buf, len,
|
||||||
cl->server->conf->script_timeout);
|
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 */
|
||||||
|
|
|
@ -298,9 +298,13 @@ static bool uh_lua_socket_cb(struct client *cl)
|
||||||
else
|
else
|
||||||
state->content_length = 0;
|
state->content_length = 0;
|
||||||
|
|
||||||
/* ... write to CGI process */
|
/* ... write to Lua process */
|
||||||
len = uh_raw_send(state->wfd, buf, len,
|
len = uh_raw_send(state->wfd, buf, len,
|
||||||
cl->server->conf->script_timeout);
|
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 */
|
||||||
|
|
Loading…
Reference in New Issue