Mercurial > hg > nginx
comparison src/http/modules/ngx_http_image_filter_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 | 317e0893a1e6 |
children | 8cdec62a7751 |
comparison
equal
deleted
inserted
replaced
5496:9d056f10fb99 | 5497:2cfc095a607a |
---|---|
570 b->last_buf = 1; | 570 b->last_buf = 1; |
571 | 571 |
572 ngx_http_clean_header(r); | 572 ngx_http_clean_header(r); |
573 | 573 |
574 r->headers_out.status = NGX_HTTP_OK; | 574 r->headers_out.status = NGX_HTTP_OK; |
575 r->headers_out.content_type_len = sizeof("application/json") - 1; | |
575 ngx_str_set(&r->headers_out.content_type, "application/json"); | 576 ngx_str_set(&r->headers_out.content_type, "application/json"); |
576 r->headers_out.content_type_lowcase = NULL; | 577 r->headers_out.content_type_lowcase = NULL; |
577 | 578 |
578 if (ctx == NULL) { | 579 if (ctx == NULL) { |
579 b->pos = (u_char *) "{}" CRLF; | 580 b->pos = (u_char *) "{}" CRLF; |