Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 87B9576B5 for ; Sun, 2 Oct 2011 23:00:57 +0000 (UTC) Received: (qmail 93909 invoked by uid 500); 2 Oct 2011 23:00:56 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 93861 invoked by uid 500); 2 Oct 2011 23:00:56 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 93854 invoked by uid 99); 2 Oct 2011 23:00:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Oct 2011 23:00:56 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Oct 2011 23:00:55 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 84E402A5A4D for ; Sun, 2 Oct 2011 23:00:34 +0000 (UTC) Date: Sun, 2 Oct 2011 23:00:34 +0000 (UTC) From: "Uwe Schindler (Commented) (JIRA)" To: dev@lucene.apache.org Message-ID: <1599633086.1739.1317596434546.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119098#comment-13119098 ] Uwe Schindler commented on SOLR-1123: ------------------------------------- +1 to change the content type to the official one. I was about to do this together with another ResponseWriter change once ago... the wrong type is a problem for all users actually using browsers with plugins. If Solr would send xml without application/xml I would complain, too, as e.g. Internet Explorer has the best xml viewer on earth (sorry, FF and Chrome have broken namespace prefix support). > Change the JSONResponseWriter content type > ------------------------------------------ > > Key: SOLR-1123 > URL: https://issues.apache.org/jira/browse/SOLR-1123 > Project: Solr > Issue Type: Improvement > Reporter: Uri Boness > Fix For: 3.5, 4.0 > > Attachments: JSON_contentType_incl_tests.patch > > > Currently the jSON content type is not used. Instead the palin/text content type is used. The reason for this as I understand is to enable viewing the json response as as text in the browser. While this is valid argument, I do believe that there should at least be an option to configure this writer to use the JSON content type. According to [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to be application/json (and not text/x-json). The reason this can be very helpful is that today you have plugins for browsers (e.g. [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page with application/json content type in a user friendly manner (just like xml is supported). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org