Klaus Demo nginx / ece10dd
do not store an encoded variable value as a new cached variable value Igor Sysoev 12 years ago
1 changed file(s) with 14 addition(s) and 15 deletion(s). Raw diff Collapse all Expand all
21602160 }
21612161 }
21622162
2163 p = value->data;
2164
21632165 switch (ctx->encoding) {
2164
2165 case NGX_HTTP_SSI_NO_ENCODING:
2166 break;
21672166
21682167 case NGX_HTTP_SSI_URL_ENCODING:
21692168 len = 2 * ngx_escape_uri(NULL, value->data, value->len,
21762175 }
21772176
21782177 (void) ngx_escape_uri(p, value->data, value->len, NGX_ESCAPE_HTML);
2179
2180 value->len += len;
2181 value->data = p;
2182 }
2183
2178 }
2179
2180 len += value->len;
21842181 break;
21852182
21862183 case NGX_HTTP_SSI_ENTITY_ENCODING:
21932190 }
21942191
21952192 (void) ngx_escape_html(p, value->data, value->len);
2196
2197 value->len += len;
2198 value->data = p;
2199 }
2200
2193 }
2194
2195 len += value->len;
2196 break;
2197
2198 default: /* NGX_HTTP_SSI_NO_ENCODING */
2199 len = value->len;
22012200 break;
22022201 }
22032202
22122211 }
22132212
22142213 b->memory = 1;
2215 b->pos = value->data;
2216 b->last = value->data + value->len;
2214 b->pos = p;
2215 b->last = p + len;
22172216
22182217 cl->buf = b;
22192218 cl->next = NULL;