David Arthur created SOLR-5272:
----------------------------------

             Summary: Schema REST API not returning correct Content-Type for 
JSON
                 Key: SOLR-5272
                 URL: https://issues.apache.org/jira/browse/SOLR-5272
             Project: Solr
          Issue Type: Bug
          Components: Response Writers
    Affects Versions: 4.4
            Reporter: David Arthur


The new Schema REST API is not returning application/json as the Content-Type 
when wt=json (or when wt is omitted).

Examples:

$ curl -s -D - http://localhost:8888/solr/collection1/schema/fields -o /dev/null

{code}
HTTP/1.1 200 OK
Content-Type: text/plain; charset=UTF-8
Date: Wed, 25 Sep 2013 17:29:24 GMT
Accept-Ranges: bytes
Transfer-Encoding: chunked
{code}

$ curl -s -D - http://localhost:8888/solr/collection1/schema/fields?wt=json -o 
/dev/null

{code}
HTTP/1.1 200 OK
Content-Type: text/plain; charset=UTF-8
Date: Wed, 25 Sep 2013 17:30:59 GMT
Accept-Ranges: bytes
Transfer-Encoding: chunked
{code}

$ curl -s -D - http://localhost:8888/solr/collection1/schema/fields?wt=xml -o 
/dev/null

{code}
HTTP/1.1 200 OK
Content-Type: application/xml; charset=UTF-8
Date: Wed, 25 Sep 2013 17:31:13 GMT
Accept-Ranges: bytes
Transfer-Encoding: chunked
{code}

$ curl -s -D - http://localhost:8888/solr/collection1/schema/fields?wt=javabin 
-o /dev/null

{code}
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Date: Wed, 25 Sep 2013 17:31:45 GMT
Accept-Ranges: bytes
Transfer-Encoding: chunked
{code}

This might be more than just a schema REST API problem - perhaps something to 
do with the Restlet/Solr writer bridge? I peeked in the code but saw nothing 
obvious.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to