Mercurial > hg > nginx
comparison src/http/modules/ngx_http_ssi_filter_module.c @ 3516:dd1570b6f237
ngx_str_set() and ngx_str_null()
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 14 May 2010 09:56:37 +0000 |
parents | 0eb46e3c5c02 |
children | ac33852faaac |
comparison
equal
deleted
inserted
replaced
3515:76d252724db5 | 3516:dd1570b6f237 |
---|---|
344 ctx->params.elts = ctx->params_array; | 344 ctx->params.elts = ctx->params_array; |
345 ctx->params.size = sizeof(ngx_table_elt_t); | 345 ctx->params.size = sizeof(ngx_table_elt_t); |
346 ctx->params.nalloc = NGX_HTTP_SSI_PARAMS_N; | 346 ctx->params.nalloc = NGX_HTTP_SSI_PARAMS_N; |
347 ctx->params.pool = r->pool; | 347 ctx->params.pool = r->pool; |
348 | 348 |
349 ctx->timefmt.len = sizeof("%A, %d-%b-%Y %H:%M:%S %Z") - 1; | 349 ngx_str_set(&ctx->timefmt, "%A, %d-%b-%Y %H:%M:%S %Z"); |
350 ctx->timefmt.data = (u_char *) "%A, %d-%b-%Y %H:%M:%S %Z"; | 350 ngx_str_set(&ctx->errmsg, |
351 | 351 "[an error occurred while processing the directive]"); |
352 ctx->errmsg.len = | |
353 sizeof("[an error occurred while processing the directive]") - 1; | |
354 ctx->errmsg.data = (u_char *) | |
355 "[an error occurred while processing the directive]"; | |
356 | 352 |
357 r->filter_need_in_memory = 1; | 353 r->filter_need_in_memory = 1; |
358 | 354 |
359 if (r == r->main) { | 355 if (r == r->main) { |
360 ngx_http_clear_content_length(r); | 356 ngx_http_clear_content_length(r); |
1902 uri->len = dst - uri->data; | 1898 uri->len = dst - uri->data; |
1903 | 1899 |
1904 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | 1900 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
1905 "ssi include: \"%V\"", uri); | 1901 "ssi include: \"%V\"", uri); |
1906 | 1902 |
1907 args.len = 0; | 1903 ngx_str_null(&args); |
1908 args.data = NULL; | |
1909 flags = NGX_HTTP_LOG_UNSAFE; | 1904 flags = NGX_HTTP_LOG_UNSAFE; |
1910 | 1905 |
1911 if (ngx_http_parse_unsafe_uri(r, uri, &args, &flags) != NGX_OK) { | 1906 if (ngx_http_parse_unsafe_uri(r, uri, &args, &flags) != NGX_OK) { |
1912 return NGX_HTTP_SSI_ERROR; | 1907 return NGX_HTTP_SSI_ERROR; |
1913 } | 1908 } |