Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Wrong mime type for JSONP response #41

Open
rohm1 opened this issue Feb 17, 2016 · 2 comments
Open

Wrong mime type for JSONP response #41

rohm1 opened this issue Feb 17, 2016 · 2 comments

Comments

@rohm1
Copy link

rohm1 commented Feb 17, 2016

If I set a JSONP callback to my JSON view model, the returned mime type is application/json instead of application/javascript. This is due to the JsonStrategy which checks if the JsonRenderer has a JSONP callback to switch the mime type. But the JsonRenderer doesn't have a JSONP callback, only my view model has one.

As a workaround, I now set the callback to the renderer ($this->getServiceLocator()->get('ViewJsonRenderer')->setJsonpCallback($callback);).

@thedava
Copy link

thedava commented Jul 12, 2016

+1

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas/laminas-view; a new issue has been opened at laminas/laminas-view#27.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants