Mercurial > hg > nginx
comparison src/http/modules/ngx_http_autoindex_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 | c7d57b539248 |
children | 84905c7b2aa7 |
comparison
equal
deleted
inserted
replaced
3515:76d252724db5 | 3516:dd1570b6f237 |
---|---|
233 return ngx_http_autoindex_error(r, &dir, &path); | 233 return ngx_http_autoindex_error(r, &dir, &path); |
234 } | 234 } |
235 | 235 |
236 r->headers_out.status = NGX_HTTP_OK; | 236 r->headers_out.status = NGX_HTTP_OK; |
237 r->headers_out.content_type_len = sizeof("text/html") - 1; | 237 r->headers_out.content_type_len = sizeof("text/html") - 1; |
238 r->headers_out.content_type.len = sizeof("text/html") - 1; | 238 ngx_str_set(&r->headers_out.content_type, "text/html"); |
239 r->headers_out.content_type.data = (u_char *) "text/html"; | |
240 | 239 |
241 rc = ngx_http_send_header(r); | 240 rc = ngx_http_send_header(r); |
242 | 241 |
243 if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) { | 242 if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) { |
244 if (ngx_close_dir(&dir) == NGX_ERROR) { | 243 if (ngx_close_dir(&dir) == NGX_ERROR) { |