Welcome! Log In Create A New Profile

Advanced

[nginx] Image filter: use "application/json" MIME type for JSON ...

Valentin Bartenev
August 05, 2013 06:34AM
details: http://hg.nginx.org/nginx/rev/31932b5464f0
branches:
changeset: 5315:31932b5464f0
user: Valentin Bartenev <vbart@nginx.com>
date: Mon Aug 05 14:30:03 2013 +0400
description:
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.

diffstat:

src/http/modules/ngx_http_image_filter_module.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 0300d97c6084 -r 31932b5464f0 src/http/modules/ngx_http_image_filter_module.c
--- a/src/http/modules/ngx_http_image_filter_module.c Mon Aug 05 13:44:56 2013 +0400
+++ b/src/http/modules/ngx_http_image_filter_module.c Mon Aug 05 14:30:03 2013 +0400
@@ -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) {

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Image filter: use "application/json" MIME type for JSON ...

Valentin Bartenev 1046 August 05, 2013 06:34AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 72
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready