comparison src/http/modules/ngx_http_stub_status_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 022ec9420f80
children d620f497c50f
comparison
equal deleted inserted replaced
3515:76d252724db5 3516:dd1570b6f237
73 73
74 if (rc != NGX_OK) { 74 if (rc != NGX_OK) {
75 return rc; 75 return rc;
76 } 76 }
77 77
78 r->headers_out.content_type.len = sizeof("text/plain") - 1; 78 ngx_str_set(&r->headers_out.content_type, "text/plain");
79 r->headers_out.content_type.data = (u_char *) "text/plain";
80 79
81 if (r->method == NGX_HTTP_HEAD) { 80 if (r->method == NGX_HTTP_HEAD) {
82 r->headers_out.status = NGX_HTTP_OK; 81 r->headers_out.status = NGX_HTTP_OK;
83 82
84 rc = ngx_http_send_header(r); 83 rc = ngx_http_send_header(r);