diff --git a/CHANGES b/CHANGES index 5864a31af2..7260c952d5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) mod_lua: Remove ETAG, Content-Length, and Content-MD5 when a LuaOutputFilter + is configured without mod_filter. [Eric Covener] + *) mod_lua: Register LuaOutputFilter scripts as changing the content and content-length by default, when run my mod_filter. Previously, growing or shrinking a response that started with Content-Length set diff --git a/modules/lua/mod_lua.c b/modules/lua/mod_lua.c index 4efe0e6dba..bdf5b16dfb 100644 --- a/modules/lua/mod_lua.c +++ b/modules/lua/mod_lua.c @@ -377,6 +377,12 @@ static apr_status_t lua_setup_filter_ctx(ap_filter_t* f, request_rec* r, lua_fil */ rc = lua_resume(L, 1); if (rc == LUA_YIELD) { + if (f->frec->providers == NULL) { + /* Not wired by mod_filter */ + apr_table_unset(r->headers_out, "Content-Length"); + apr_table_unset(r->headers_out, "Content-MD5"); + apr_table_unset(r->headers_out, "ETAG"); + } return OK; } else {