commit
966c8d72d2
95
httpd-2.4.43-lua-resume.patch
Normal file
95
httpd-2.4.43-lua-resume.patch
Normal file
@ -0,0 +1,95 @@
|
||||
diff --git a/modules/lua/mod_lua.c b/modules/lua/mod_lua.c
|
||||
index 05f1e44..be3bedf 100644
|
||||
--- a/modules/lua/mod_lua.c
|
||||
+++ b/modules/lua/mod_lua.c
|
||||
@@ -342,7 +342,7 @@ static apr_status_t lua_setup_filter_ctx(ap_filter_t* f, request_rec* r, lua_fil
|
||||
{
|
||||
apr_pool_t *pool;
|
||||
ap_lua_vm_spec *spec;
|
||||
- int n, rc;
|
||||
+ int n, rc, nres;
|
||||
lua_State *L;
|
||||
lua_filter_ctx *ctx;
|
||||
ap_lua_server_cfg *server_cfg = ap_get_module_config(r->server->module_config,
|
||||
@@ -410,7 +410,7 @@ static apr_status_t lua_setup_filter_ctx(ap_filter_t* f, request_rec* r, lua_fil
|
||||
/* If a Lua filter is interested in filtering a request, it must first do a yield,
|
||||
* otherwise we'll assume that it's not interested and pretend we didn't find it.
|
||||
*/
|
||||
- rc = lua_resume(L, 1);
|
||||
+ rc = lua_resume(L, 1, &nres);
|
||||
if (rc == LUA_YIELD) {
|
||||
if (f->frec->providers == NULL) {
|
||||
/* Not wired by mod_filter */
|
||||
@@ -432,7 +432,7 @@ static apr_status_t lua_setup_filter_ctx(ap_filter_t* f, request_rec* r, lua_fil
|
||||
static apr_status_t lua_output_filter_handle(ap_filter_t *f, apr_bucket_brigade *pbbIn)
|
||||
{
|
||||
request_rec *r = f->r;
|
||||
- int rc;
|
||||
+ int rc, nres;
|
||||
lua_State *L;
|
||||
lua_filter_ctx* ctx;
|
||||
conn_rec *c = r->connection;
|
||||
@@ -492,7 +492,7 @@ static apr_status_t lua_output_filter_handle(ap_filter_t *f, apr_bucket_brigade
|
||||
lua_setglobal(L, "bucket");
|
||||
|
||||
/* If Lua yielded, it means we have something to pass on */
|
||||
- if (lua_resume(L, 0) == LUA_YIELD) {
|
||||
+ if (lua_resume(L, 0, &nres) == LUA_YIELD) {
|
||||
size_t olen;
|
||||
const char* output = lua_tolstring(L, 1, &olen);
|
||||
if (olen > 0) {
|
||||
@@ -524,7 +524,7 @@ static apr_status_t lua_output_filter_handle(ap_filter_t *f, apr_bucket_brigade
|
||||
apr_bucket *pbktEOS;
|
||||
lua_pushnil(L);
|
||||
lua_setglobal(L, "bucket");
|
||||
- if (lua_resume(L, 0) == LUA_YIELD) {
|
||||
+ if (lua_resume(L, 0, &nres) == LUA_YIELD) {
|
||||
apr_bucket *pbktOut;
|
||||
size_t olen;
|
||||
const char* output = lua_tolstring(L, 1, &olen);
|
||||
@@ -558,7 +558,7 @@ static apr_status_t lua_input_filter_handle(ap_filter_t *f,
|
||||
apr_off_t nBytes)
|
||||
{
|
||||
request_rec *r = f->r;
|
||||
- int rc, lastCall = 0;
|
||||
+ int rc, lastCall = 0, nres;
|
||||
lua_State *L;
|
||||
lua_filter_ctx* ctx;
|
||||
conn_rec *c = r->connection;
|
||||
@@ -621,7 +621,7 @@ static apr_status_t lua_input_filter_handle(ap_filter_t *f,
|
||||
lua_setglobal(L, "bucket");
|
||||
|
||||
/* If Lua yielded, it means we have something to pass on */
|
||||
- if (lua_resume(L, 0) == LUA_YIELD) {
|
||||
+ if (lua_resume(L, 0, &nres) == LUA_YIELD) {
|
||||
size_t olen;
|
||||
const char* output = lua_tolstring(L, 1, &olen);
|
||||
pbktOut = apr_bucket_heap_create(output, olen, 0, c->bucket_alloc);
|
||||
@@ -643,7 +643,7 @@ static apr_status_t lua_input_filter_handle(ap_filter_t *f,
|
||||
apr_bucket *pbktEOS = apr_bucket_eos_create(c->bucket_alloc);
|
||||
lua_pushnil(L);
|
||||
lua_setglobal(L, "bucket");
|
||||
- if (lua_resume(L, 0) == LUA_YIELD) {
|
||||
+ if (lua_resume(L, 0, &nres) == LUA_YIELD) {
|
||||
apr_bucket *pbktOut;
|
||||
size_t olen;
|
||||
const char* output = lua_tolstring(L, 1, &olen);
|
||||
diff --git a/modules/lua/mod_lua.h b/modules/lua/mod_lua.h
|
||||
index 0e49cdc..8921b87 100644
|
||||
--- a/modules/lua/mod_lua.h
|
||||
+++ b/modules/lua/mod_lua.h
|
||||
@@ -48,7 +48,13 @@
|
||||
#if LUA_VERSION_NUM > 501
|
||||
/* Load mode for lua_load() */
|
||||
#define lua_load(a,b,c,d) lua_load(a,b,c,d,NULL)
|
||||
-#define lua_resume(a,b) lua_resume(a, NULL, b)
|
||||
+
|
||||
+#if LUA_VERSION_NUM > 503
|
||||
+#define lua_resume(a,b,c) lua_resume(a, NULL, b, c)
|
||||
+#else
|
||||
+#define lua_resume(a,b,c) lua_resume(a, NULL, b)
|
||||
+#endif
|
||||
+
|
||||
#define luaL_setfuncs_compat(a,b) luaL_setfuncs(a,b,0)
|
||||
#else
|
||||
#define lua_rawlen(L,i) lua_objlen(L, (i))
|
||||
40
httpd.spec
40
httpd.spec
@ -8,7 +8,7 @@
|
||||
Name: httpd
|
||||
Summary: Apache HTTP Server
|
||||
Version: 2.4.43
|
||||
Release: 1
|
||||
Release: 2
|
||||
License: ASL 2.0
|
||||
URL: https://httpd.apache.org/
|
||||
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
|
||||
@ -50,22 +50,22 @@ Source42: httpd-init.service
|
||||
Source43: httpd-ssl-gencerts
|
||||
Source44: httpd@.service
|
||||
|
||||
Patch0001: httpd-2.4.1-apctl.patch
|
||||
Patch0002: httpd-2.4.9-apxs.patch
|
||||
Patch0003: httpd-2.4.1-deplibs.patch
|
||||
Patch0006: httpd-2.4.3-apctl-systemd.patch
|
||||
Patch0019: httpd-2.4.25-detect-systemd.patch
|
||||
Patch0023: httpd-2.4.33-export.patch
|
||||
Patch0024: httpd-2.4.1-corelimit.patch
|
||||
Patch0025: httpd-2.4.25-selinux.patch
|
||||
Patch0027: httpd-2.4.2-icons.patch
|
||||
Patch0030: httpd-2.4.4-cachehardmax.patch
|
||||
Patch0034: httpd-2.4.17-socket-activation.patch
|
||||
Patch0038: httpd-2.4.34-sslciphdefault.patch
|
||||
Patch0039: httpd-2.4.34-sslprotdefault.patch
|
||||
Patch0060: httpd-2.4.34-enable-sslv3.patch
|
||||
|
||||
Patch9000: layout_add_openEuler.patch
|
||||
Patch0: httpd-2.4.1-apctl.patch
|
||||
Patch1: httpd-2.4.9-apxs.patch
|
||||
Patch2: httpd-2.4.1-deplibs.patch
|
||||
Patch3: httpd-2.4.3-apctl-systemd.patch
|
||||
Patch4: httpd-2.4.25-detect-systemd.patch
|
||||
Patch5: httpd-2.4.33-export.patch
|
||||
Patch6: httpd-2.4.1-corelimit.patch
|
||||
Patch7: httpd-2.4.25-selinux.patch
|
||||
Patch8: httpd-2.4.2-icons.patch
|
||||
Patch9: httpd-2.4.4-cachehardmax.patch
|
||||
Patch10: httpd-2.4.17-socket-activation.patch
|
||||
Patch11: httpd-2.4.34-sslciphdefault.patch
|
||||
Patch12: httpd-2.4.34-sslprotdefault.patch
|
||||
Patch13: httpd-2.4.34-enable-sslv3.patch
|
||||
Patch14: layout_add_openEuler.patch
|
||||
Patch15: httpd-2.4.43-lua-resume.patch
|
||||
|
||||
BuildRequires: gcc autoconf pkgconfig findutils xmlto perl-interpreter perl-generators systemd-devel
|
||||
BuildRequires: zlib-devel libselinux-devel lua-devel brotli-devel
|
||||
@ -502,6 +502,12 @@ exit $rv
|
||||
%{_rpmconfigdir}/macros.d/macros.httpd
|
||||
|
||||
%changelog
|
||||
* Thu Aug 06 2020 gaihuiying <gaihuiying1@huawei.com> - 2.4.43-2
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:fix build error
|
||||
|
||||
* Fri Jul 24 2020 zhujunhao <zhujunhao8@huawei.com> - 2.4.43-1
|
||||
- Type:NA
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user