[ https://issues.apache.org/jira/browse/JCR-4766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Woonsan Ko updated JCR-4766: ---------------------------- Description: 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 --user name:pass http://localhost:8080/server/default/jcr:root/hello.json {code} - The {{Content-Type}} response header should be "application/json" or one of its compatibles. [1] https://jukkaz.wordpress.com/2009/11/24/jackrabbit-over-http/ was: 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}} > 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 --user name:pass > http://localhost:8080/server/default/jcr:root/hello.json > {code} > - The {{Content-Type}} response header should be "application/json" or one of > its compatibles. > [1] https://jukkaz.wordpress.com/2009/11/24/jackrabbit-over-http/ -- This message was sent by Atlassian Jira (v8.20.1#820001)