diff src/http/modules/ngx_http_image_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 11965c62b92c
children 1a728cc43bb1
line wrap: on
line diff
--- a/src/http/modules/ngx_http_image_filter_module.c
+++ b/src/http/modules/ngx_http_image_filter_module.c
@@ -529,8 +529,7 @@ ngx_http_image_json(ngx_http_request_t *
     ngx_http_clean_header(r);
 
     r->headers_out.status = NGX_HTTP_OK;
-    r->headers_out.content_type.len = sizeof("text/plain") - 1;
-    r->headers_out.content_type.data = (u_char *) "text/plain";
+    ngx_str_set(&r->headers_out.content_type, "text/plain");
     r->headers_out.content_type_lowcase = NULL;
 
     if (ctx == NULL) {