mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
register LuaOutputFilters with AP_FILTER_PROTO_CHANGE|AP_FILTER_PROTO_CHANGE_LENGTH
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1519476 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
5
CHANGES
5
CHANGES
@@ -1,6 +1,11 @@
|
|||||||
-*- coding: utf-8 -*-
|
-*- coding: utf-8 -*-
|
||||||
Changes with Apache 2.5.0
|
Changes with Apache 2.5.0
|
||||||
|
|
||||||
|
*) 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
|
||||||
|
would require mod_filter and FilterProtocol change=yes.
|
||||||
|
|
||||||
*) mod_filter: Add "change=no" as a proto-flag to FilterProtocol
|
*) mod_filter: Add "change=no" as a proto-flag to FilterProtocol
|
||||||
to remove a providers initial flags set at registration time.
|
to remove a providers initial flags set at registration time.
|
||||||
[Eric Covener]
|
[Eric Covener]
|
||||||
|
@@ -318,7 +318,10 @@ static apr_status_t lua_setup_filter_ctx(ap_filter_t* f, request_rec* r, lua_fil
|
|||||||
ctx = apr_pcalloc(r->pool, sizeof(lua_filter_ctx));
|
ctx = apr_pcalloc(r->pool, sizeof(lua_filter_ctx));
|
||||||
ctx->broken = 0;
|
ctx->broken = 0;
|
||||||
*c = ctx;
|
*c = ctx;
|
||||||
/* Find the filter that was called */
|
/* Find the filter that was called.
|
||||||
|
* XXX: If we were wired with mod_filter, the filter (mod_filters name)
|
||||||
|
* and the provider (our underlying filters name) need to have matched.
|
||||||
|
*/
|
||||||
for (n = 0; n < cfg->mapped_filters->nelts; n++) {
|
for (n = 0; n < cfg->mapped_filters->nelts; n++) {
|
||||||
ap_lua_filter_handler_spec *hook_spec =
|
ap_lua_filter_handler_spec *hook_spec =
|
||||||
((ap_lua_filter_handler_spec **) cfg->mapped_filters->elts)[n];
|
((ap_lua_filter_handler_spec **) cfg->mapped_filters->elts)[n];
|
||||||
@@ -1083,7 +1086,8 @@ static const char *register_filter_function_hook(const char *filter,
|
|||||||
/* TODO: Make it work on other types than just AP_FTYPE_RESOURCE? */
|
/* TODO: Make it work on other types than just AP_FTYPE_RESOURCE? */
|
||||||
if (direction == AP_LUA_FILTER_OUTPUT) {
|
if (direction == AP_LUA_FILTER_OUTPUT) {
|
||||||
spec->direction = AP_LUA_FILTER_OUTPUT;
|
spec->direction = AP_LUA_FILTER_OUTPUT;
|
||||||
ap_register_output_filter(filter, lua_output_filter_handle, NULL, AP_FTYPE_RESOURCE);
|
ap_register_output_filter_protocol(filter, lua_output_filter_handle, NULL, AP_FTYPE_RESOURCE,
|
||||||
|
AP_FILTER_PROTO_CHANGE|AP_FILTER_PROTO_CHANGE_LENGTH);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
spec->direction = AP_LUA_FILTER_INPUT;
|
spec->direction = AP_LUA_FILTER_INPUT;
|
||||||
|
Reference in New Issue
Block a user