issue with XSLT [0.8.x]

Maxim Dounin mdounin at mdounin.ru
Fri Jul 17 07:16:31 MSD 2009


Hello!

On Fri, Jul 17, 2009 at 11:14:57AM +0900, Kuramoto Eiji wrote:

> I think it may be a bug.
> 
> well-formed status (ctx->ctxt->wellFormed) should check and save
> before free xmlParserCtxtPtr. like this,

Nice catch, thanks!

Maxim Dounin

> 
> --- ngx_http_xslt_filter_module.c	29 May 2009 03:29:15 -0000	1.8
> +++ ngx_http_xslt_filter_module.c	2 Jun 2009 08:15:28 -0000	1.9
> @@ -273,6 +273,7 @@
>  {
>      ngx_chain_t                 *cl;
>      ngx_http_xslt_filter_ctx_t  *ctx;
> +    int wellFormed;
>  
>      ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
>                     "xslt filter body");
> @@ -312,9 +313,14 @@
>              ctx->doc->extSubset = NULL;
>  #endif
>  
> +	    /*
> +	     * save well-formed status, so free ctx->ctxt in xmlFreeParserCtxt().
> +	     */
> +	    wellFormed = ctx->ctxt->wellFormed;
> +
>              xmlFreeParserCtxt(ctx->ctxt);
>  
> -            if (ctx->ctxt->wellFormed) {
> +            if (wellFormed) {
>                  return ngx_http_xslt_send(r, ctx,
>                                         ngx_http_xslt_apply_stylesheet(r, ctx));
>              }
> 
>  On Thu, 16 Jul 2009 16:19:05 -0400
>     valve wrote:
> 
>  } I'm having a weird issue with the XSLT module in nginx: after some random time, requesting an XSLT-transformed URL generates 500-errors. The errorlog tells me that the XML-document is not well formed, which it is.
>  } 
>  } It seems to be similar to an issue raised on the Russian maillinglist (http://www.lexa.ru/nginx-ru/msg25325.html ), although I'm not using FastCGI but just use static XML files as input for the XSLT-engine.
> 
> - Kuramoto Eiji
> 





More information about the nginx mailing list