comparison src/http/modules/ngx_http_xslt_filter_module.c @ 7154:595a3de03e91

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.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 16 Nov 2017 13:20:47 +0300
parents 99934aade555
children 9a970c905045
comparison
equal deleted inserted replaced
7153:32f83fe5747b 7154:595a3de03e91
684 /* 684 /*
685 * parse param1=value1:param2=value2 syntax as used by parameters 685 * parse param1=value1:param2=value2 syntax as used by parameters
686 * specified in xslt_stylesheet directives 686 * specified in xslt_stylesheet directives
687 */ 687 */
688 688
689 p = string.data; 689 if (param[i].value.lengths) {
690 last = string.data + string.len; 690 p = string.data;
691
692 } else {
693 p = ngx_pnalloc(r->pool, string.len + 1);
694 if (p == NULL) {
695 return NGX_ERROR;
696 }
697
698 ngx_memcpy(p, string.data, string.len + 1);
699 }
700
701 last = p + string.len;
691 702
692 while (p && *p) { 703 while (p && *p) {
693 704
694 value = p; 705 value = p;
695 p = (u_char *) ngx_strchr(p, '='); 706 p = (u_char *) ngx_strchr(p, '=');