mirror of
https://github.com/nginx/nginx.git
synced 2024-12-23 15:40:03 -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
|
||||||
*/
|
*/
|
||||||
|
|
||||||
p = string.data;
|
if (param[i].value.lengths) {
|
||||||
last = string.data + string.len;
|
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) {
|
while (p && *p) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user