Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 85636 invoked from network); 30 Aug 2010 18:31:40 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Aug 2010 18:31:40 -0000 Received: (qmail 70048 invoked by uid 500); 30 Aug 2010 18:31:39 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 69974 invoked by uid 500); 30 Aug 2010 18:31:39 -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 69967 invoked by uid 99); 30 Aug 2010 18:31:38 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Aug 2010 18:31:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Aug 2010 18:31:21 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o7UIUxh3010448 for ; Mon, 30 Aug 2010 18:31:00 GMT Message-ID: <24871843.72641283193059818.JavaMail.jira@thor> Date: Mon, 30 Aug 2010 14:30:59 -0400 (EDT) From: "Chris Tucker (JIRA)" To: dev@lucene.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 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12904275#action_12904275 ] Chris Tucker commented on SOLR-1123: ------------------------------------ I'd like to +1 the short-term fix. The incorrect content type makes it difficult to filter/transform the response in a servlet filter or Jetty handler: one has to inspect the wt parameter on the request to establish (guess?) that JSON has been requested and is being sent back. > 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: Next > > 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. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org