diff src/http/modules/ngx_http_image_filter_module.c @ 5315:31932b5464f0

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.
author Valentin Bartenev <vbart@nginx.com>
date Mon, 05 Aug 2013 14:30:03 +0400
parents af155fc41deb
children 317e0893a1e6
line wrap: on
line diff
--- 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) {