Mercurial > hg > nginx
comparison src/http/modules/ngx_http_autoindex_module.c @ 5497:2cfc095a607a
Fixed setting of content type in some cases.
This fixes content type set in stub_status and autoindex responses
to be usable in content type checks made by filter modules, such
as charset and sub filters.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Fri, 27 Dec 2013 19:40:04 +0400 |
parents | e8bca8397625 |
children | 631dee7bfd4e |
comparison
equal
deleted
inserted
replaced
5496:9d056f10fb99 | 5497:2cfc095a607a |
---|---|
231 } | 231 } |
232 | 232 |
233 r->headers_out.status = NGX_HTTP_OK; | 233 r->headers_out.status = NGX_HTTP_OK; |
234 r->headers_out.content_type_len = sizeof("text/html") - 1; | 234 r->headers_out.content_type_len = sizeof("text/html") - 1; |
235 ngx_str_set(&r->headers_out.content_type, "text/html"); | 235 ngx_str_set(&r->headers_out.content_type, "text/html"); |
236 r->headers_out.content_type_lowcase = NULL; | |
236 | 237 |
237 rc = ngx_http_send_header(r); | 238 rc = ngx_http_send_header(r); |
238 | 239 |
239 if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) { | 240 if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) { |
240 if (ngx_close_dir(&dir) == NGX_ERROR) { | 241 if (ngx_close_dir(&dir) == NGX_ERROR) { |