comparison src/http/modules/ngx_http_stub_status_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 ee739104d164
children dc7c139fca21
comparison
equal deleted inserted replaced
5496:9d056f10fb99 5497:2cfc095a607a
96 96
97 if (rc != NGX_OK) { 97 if (rc != NGX_OK) {
98 return rc; 98 return rc;
99 } 99 }
100 100
101 r->headers_out.content_type_len = sizeof("text/plain") - 1;
101 ngx_str_set(&r->headers_out.content_type, "text/plain"); 102 ngx_str_set(&r->headers_out.content_type, "text/plain");
103 r->headers_out.content_type_lowcase = NULL;
102 104
103 if (r->method == NGX_HTTP_HEAD) { 105 if (r->method == NGX_HTTP_HEAD) {
104 r->headers_out.status = NGX_HTTP_OK; 106 r->headers_out.status = NGX_HTTP_OK;
105 107
106 rc = ngx_http_send_header(r); 108 rc = ngx_http_send_header(r);