# HG changeset patch # User Valentin Bartenev # Date 1375698603 -14400 # Node ID 31932b5464f0230d5039fafed94c33f495da35f6 # Parent 0300d97c60842352888b24495d10139454159766 Image filter: use "application/json" MIME type for JSON output. As it is defined by RFC 4627, and allows for various browser tools like JSONView to display JSON well-formatted. diff --git a/src/http/modules/ngx_http_image_filter_module.c b/src/http/modules/ngx_http_image_filter_module.c --- a/src/http/modules/ngx_http_image_filter_module.c +++ b/src/http/modules/ngx_http_image_filter_module.c @@ -567,7 +567,7 @@ ngx_http_image_json(ngx_http_request_t * ngx_http_clean_header(r); r->headers_out.status = NGX_HTTP_OK; - ngx_str_set(&r->headers_out.content_type, "text/plain"); + ngx_str_set(&r->headers_out.content_type, "application/json"); r->headers_out.content_type_lowcase = NULL; if (ctx == NULL) {