mirror of
https://github.com/nginx/nginx.git
synced 2024-12-24 08:00:14 -06:00
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.
This commit is contained in:
parent
d303a95594
commit
cdbdbbd842
@ -686,8 +686,19 @@ ngx_http_xslt_params(ngx_http_request_t *r, ngx_http_xslt_filter_ctx_t *ctx,
|
|||||||
* specified in xslt_stylesheet directives
|
* specified in xslt_stylesheet directives
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (param[i].value.lengths) {
|
||||||
p = string.data;
|
p = string.data;
|
||||||
last = string.data + string.len;
|
|
||||||
|
} 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) {
|
while (p && *p) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user