[ https://issues.apache.org/jira/browse/JCR-4766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17495495#comment-17495495 ]
Woonsan Ko commented on JCR-4766: --------------------------------- PR ready for review: https://github.com/apache/jackrabbit/pull/96 > JcrRemotingServlet should write application/json content for JSON response > -------------------------------------------------------------------------- > > Key: JCR-4766 > URL: https://issues.apache.org/jira/browse/JCR-4766 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: jackrabbit-jcr-server > Affects Versions: 2.21.10 > Reporter: Woonsan Ko > Priority: Minor > > When retrieving a JCR node using JSON binding like the following by appending > '.json' to the path, the content-type of the response should have been > {{application/json}}, instead of the current {{text/plain;charset=utf-8}}. > {{GET http://localhost:8080/server/default/jcr:root/hello.json}} > Reproduction: > - Create a node (e.g, hello) like the following (excerpt from [1]): > {code} > $ curl --request MKCOL --data @- --user name:pass \ > http://localhost:8080/server/default/jcr:root/hello/ <<END > <sv:node sv:name="hello" xmlns:sv="http://www.jcp.org/jcr/sv/1.0"> > <sv:property sv:name="message" sv:type="String"> > <sv:value>Hello, World!</sv:value> > </sv:property> > <sv:property sv:name="date" sv:type="Date"> > <sv:value>2022-01-15T12:00:00.000Z</sv:value> > </sv:property> > </sv:node> > END > {code} > - Retrieve the node by JSON binding: > {code} > $ curl -i --user admin:admin > http://localhost:8080/server/default/jcr:root/hello.json > {code} > - The {{Content-Type}} response header should be "application/json" or one of > its compatibles. > But the actual value is "text/plain;charset=utf-8". > [1] https://jukkaz.wordpress.com/2009/11/24/jackrabbit-over-http/ -- This message was sent by Atlassian Jira (v8.20.1#820001)