Open markd-opmantek opened 11 years ago
To fix this I added this code to the top of the after_dispatch hook:
return if $self->res->headers->content_type eq 'application/json';
It's probably not complete but it does solve my problem.
/subscribing (same issue)
When the content_type has a charset parameter, this solution doesn't work. I think we must use index($self->res->headers->content_type,'application/json') instead of eq.
index($self->res->headers->content_type,'application/json')
eq
To fix this I added this code to the top of the after_dispatch hook:
return if $self->res->headers->content_type eq 'application/json';
It's probably not complete but it does solve my problem.