Xslt: fixed parameters parsing (ticket #1416).
If parameters were specified in xslt_stylesheet without variables,
any request except the first would cause an internal server error.
diff --git a/src/http/modules/ngx_http_xslt_filter_module.c b/src/http/modules/ngx_http_xslt_filter_module.c
index fae5895..ea7ce2a 100644
--- a/src/http/modules/ngx_http_xslt_filter_module.c
+++ b/src/http/modules/ngx_http_xslt_filter_module.c
@@ -686,8 +686,19 @@
* specified in xslt_stylesheet directives
*/
- p = string.data;
- last = string.data + string.len;
+ if (param[i].value.lengths) {
+ p = string.data;
+
+ } else {
+ p = ngx_pnalloc(r->pool, string.len + 1);
+ if (p == NULL) {
+ return NGX_ERROR;
+ }
+
+ ngx_memcpy(p, string.data, string.len + 1);
+ }
+
+ last = p + string.len;
while (p && *p) {