Welcome! Log In Create A New Profile

Advanced

[nginx] Xslt: exsltRegisterAll() moved to preconfiguration.

Maxim Dounin
July 19, 2013 08:04AM
details: http://hg.nginx.org/nginx/rev/e939f6e8548c
branches:
changeset: 5280:e939f6e8548c
user: Maxim Dounin <mdounin@mdounin.ru>
date: Fri Jul 19 15:59:50 2013 +0400
description:
Xslt: exsltRegisterAll() moved to preconfiguration.

The exsltRegisterAll() needs to be called before XSLT stylesheets
are compiled, else stylesheet compilation hooks will not work. This
change fixes EXSLT Functions extension.

diffstat:

src/http/modules/ngx_http_xslt_filter_module.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)

diffs (43 lines):

diff --git a/src/http/modules/ngx_http_xslt_filter_module.c b/src/http/modules/ngx_http_xslt_filter_module.c
--- a/src/http/modules/ngx_http_xslt_filter_module.c
+++ b/src/http/modules/ngx_http_xslt_filter_module.c
@@ -104,6 +104,7 @@ static void *ngx_http_xslt_filter_create
static void *ngx_http_xslt_filter_create_conf(ngx_conf_t *cf);
static char *ngx_http_xslt_filter_merge_conf(ngx_conf_t *cf, void *parent,
void *child);
+static ngx_int_t ngx_http_xslt_filter_preconfiguration(ngx_conf_t *cf);
static ngx_int_t ngx_http_xslt_filter_init(ngx_conf_t *cf);
static void ngx_http_xslt_filter_exit(ngx_cycle_t *cycle);

@@ -163,7 +164,7 @@ static ngx_command_t ngx_http_xslt_filt


static ngx_http_module_t ngx_http_xslt_filter_module_ctx = {
- NULL, /* preconfiguration */
+ ngx_http_xslt_filter_preconfiguration, /* preconfiguration */
ngx_http_xslt_filter_init, /* postconfiguration */

ngx_http_xslt_filter_create_main_conf, /* create main configuration */
@@ -1111,7 +1112,7 @@ ngx_http_xslt_filter_merge_conf(ngx_conf


static ngx_int_t
-ngx_http_xslt_filter_init(ngx_conf_t *cf)
+ngx_http_xslt_filter_preconfiguration(ngx_conf_t *cf)
{
xmlInitParser();

@@ -1119,6 +1120,13 @@ ngx_http_xslt_filter_init(ngx_conf_t *cf
exsltRegisterAll();
#endif

+ return NGX_OK;
+}
+
+
+static ngx_int_t
+ngx_http_xslt_filter_init(ngx_conf_t *cf)
+{
ngx_http_next_header_filter = ngx_http_top_header_filter;
ngx_http_top_header_filter = ngx_http_xslt_header_filter;


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Xslt: exsltRegisterAll() moved to preconfiguration.

Maxim Dounin 1010 July 19, 2013 08:04AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 110
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready