[MNT-16351] CMIS browser binding returns the wrong mime-type with jsonp (callback) Created: 27-May-16  Updated: 22-Nov-18  Resolved: 22-Nov-18

Status: Closed
Project: Service Packs and Hot Fixes
Component/s: CMIS
Affects Version/s: 5.1
Fix Version/s: None

Type: Bug
Reporter: Ian Wright Assignee: Closed Issues
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Bug Priority:
Category 2

 Description   

If you make a jsonp (callback) request to the 1.1 browser binding then it returns the incorrect MIME type - should be application/javascript but is application/json.

http://localhost:8080/share/proxy/alfresco-api/-default-/public/cmis/versions/1.1/browser?cmisselector=typeDescendants&depth=-1&includePropertyDefinitions=true&callback=dojo_request_script_callbacks.dojo_request_script0

This will cause the request to fail in Chrome with the console message "Refused to execute script from 'http://localhost:8080/share/proxy/alfresco-api/default/public/cmis/versio…finitions=true&callback=dojo_request_script_callbacks.dojo_request_script0' because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled."

(Note that calling the URL directly from the browser will show the page but if called via javascript the request will fail)

Response headers:
Cache-Control:private, max-age=0
Content-Type:application/json;charset=UTF-8
Date:Fri, 27 May 2016 13:31:44 GMT
Server:Apache-Coyote/1.1
Transfer-Encoding:chunked
X-Content-Type-Options:nosniff
X-Frame-Options:SAMEORIGIN
X-XSS-Protection:1; mode=block



 Comments   
Comment by Derek Hulley [X] (Inactive) [ 22-Nov-18 ]

Closing:

  • No customer request
  • Age of issue
  • Pull requests will be accepted
Generated at Sat Jan 19 23:16:10 GMT 2019 using JIRA 7.6.3#76005-sha1:8a4e38d34af948780dbf52044e7aafb13a7cae58.