-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong mime type for JSONP response #27
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I set a JSONP callback to my JSON view model, the returned mime type is
application/json
instead ofapplication/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);
).Originally posted by @rohm1 at zendframework/zend-view#41
The text was updated successfully, but these errors were encountered: