patch for #1416 xslt_stylesheet parameter only works on first request

Karim Malhas karim at malhas.de
Wed Nov 15 20:57:28 UTC 2017


Hi all,

I recently discovered a bug [0] concerning the xslt_stylesheet directive as
documented here [1].

The root cause of this issue is that the parser of the directive also
modifies it instead of just reading it. 

I have created a patch which lets the parser work on a copy of that
data, so that changes to it will not affect subsequent requests.

In my opinion this is merely a workaround, the parser probably should
not modify the data it parsed from the configuration file, but I didn't
feel comfortable to make such a big change.

Since this is my first time working with nginx I am seeking feedback on
the approach I used.


Kind regards,
Karim Malhas



[0] https://trac.nginx.org/nginx/ticket/1416
[1] https://nginx.org/en/docs/http/ngx_http_xslt_module.html#xslt_stylesheet

-- 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1416.patch
Type: text/x-diff
Size: 1665 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20171115/6534ed29/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 2991 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20171115/6534ed29/attachment-0001.bin>


More information about the nginx-devel mailing list