You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Paul R. Brown (JIRA)" <ji...@apache.org> on 2010/08/26 11:31:53 UTC

[jira] Created: (SOLR-2091) wt=json is served as text/plain

wt=json is served as text/plain
-------------------------------

                 Key: SOLR-2091
                 URL: https://issues.apache.org/jira/browse/SOLR-2091
             Project: Solr
          Issue Type: Bug
          Components: Response Writers
    Affects Versions: 1.4.1
            Reporter: Paul R. Brown


JSON data should be served as application/json.  SOLR-1123 is equivalent, except that I think that most people would regard serving JSON as text/plain as a bug.  If SOLR does serve content with a client-friendly type, then RESTful client frameworks can just do the right thing with responses.

-- 
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


[jira] Commented: (SOLR-2091) wt=json is served as text/plain

Posted by "Paul R. Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903249#action_12903249 ] 

Paul R. Brown commented on SOLR-2091:
-------------------------------------

I will look at how difficult it would be to have Solr use content negotiation to determine what to send down and how to format it.  (I've implemented some update handlers and other extensions before, so I hope this won't be that much more difficult...)

> wt=json is served as text/plain
> -------------------------------
>
>                 Key: SOLR-2091
>                 URL: https://issues.apache.org/jira/browse/SOLR-2091
>             Project: Solr
>          Issue Type: Bug
>          Components: Response Writers
>    Affects Versions: 1.4.1
>            Reporter: Paul R. Brown
>
> JSON data should be served as application/json.  SOLR-1123 is equivalent, except that I think that most people would regard serving JSON as text/plain as a bug.  If SOLR does serve content with a client-friendly type, then RESTful client frameworks can just do the right thing with responses.

-- 
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


[jira] Commented: (SOLR-2091) wt=json is served as text/plain

Posted by "Paul R. Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903100#action_12903100 ] 

Paul R. Brown commented on SOLR-2091:
-------------------------------------

Can we bump the other issue from improvement to bug, then?  The point is that this is something that will confuse folks who would like to write client code against Solr with standards-friendly tooling.

> wt=json is served as text/plain
> -------------------------------
>
>                 Key: SOLR-2091
>                 URL: https://issues.apache.org/jira/browse/SOLR-2091
>             Project: Solr
>          Issue Type: Bug
>          Components: Response Writers
>    Affects Versions: 1.4.1
>            Reporter: Paul R. Brown
>
> JSON data should be served as application/json.  SOLR-1123 is equivalent, except that I think that most people would regard serving JSON as text/plain as a bug.  If SOLR does serve content with a client-friendly type, then RESTful client frameworks can just do the right thing with responses.

-- 
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


[jira] Closed: (SOLR-2091) wt=json is served as text/plain

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2091?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yonik Seeley closed SOLR-2091.
------------------------------

    Resolution: Duplicate

closing as duplicate of SOLR-1123

> wt=json is served as text/plain
> -------------------------------
>
>                 Key: SOLR-2091
>                 URL: https://issues.apache.org/jira/browse/SOLR-2091
>             Project: Solr
>          Issue Type: Bug
>          Components: Response Writers
>    Affects Versions: 1.4.1
>            Reporter: Paul R. Brown
>
> JSON data should be served as application/json.  SOLR-1123 is equivalent, except that I think that most people would regard serving JSON as text/plain as a bug.  If SOLR does serve content with a client-friendly type, then RESTful client frameworks can just do the right thing with responses.

-- 
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


[jira] Commented: (SOLR-2091) wt=json is served as text/plain

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903161#action_12903161 ] 

Yonik Seeley commented on SOLR-2091:
------------------------------------

oops - first of all, apologies for reading your issue too fast - I didn't see that you had already referenced SOLR-1123.

Anyway, IMO it's not a bug - it was a very conscious decision to not use "application/json" (I actually had started out that way) since it makes it's use in browsers useless w/o extra plugins.  Until common browsers support JSON natively (or at least display the text w/o prompting), I think text/plain is the best default.

If we did have a parameter like wt.content-type (or a more general mechanism to set any return HTTP headers), we could also register another general request handler like /select/json that defaulted to using application/json.

> wt=json is served as text/plain
> -------------------------------
>
>                 Key: SOLR-2091
>                 URL: https://issues.apache.org/jira/browse/SOLR-2091
>             Project: Solr
>          Issue Type: Bug
>          Components: Response Writers
>    Affects Versions: 1.4.1
>            Reporter: Paul R. Brown
>
> JSON data should be served as application/json.  SOLR-1123 is equivalent, except that I think that most people would regard serving JSON as text/plain as a bug.  If SOLR does serve content with a client-friendly type, then RESTful client frameworks can just do the right thing with responses.

-- 
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