Skip Menu |

This queue is for tickets about the Catalyst-View-JSON CPAN distribution.

Report information
The Basics
Id: 38022
Status: rejected
Priority: 0/
Queue: Catalyst-View-JSON

People
Owner: Nobody in particular
Requestors: nickolay8 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: feature request : customizabale content_type header
Hello, I'd like to ask, to add new configuration option: content-type, which will set up corresponding header of response. Or change the behavior of module that way, that when this header is already present, it remains unchanged. The reason for this is that sometimes it is necessary to set up 'text/html' content-type for response (particularly during file uploads with Ext framework). Currently I patched this locally, but during following update the changes will be lost. Thanks.
From: nickolay8 [...] gmail.com
actually the patch is very small: if (($c->req->user_agent || '') =~ /Opera/) { $c->res->content_type("application/x-javascript; charset=$encoding") unless $c->res->content_type; } else { $c->res->content_type("application/json; charset=$encoding") unless $c->res->content_type; }
I think this is less of an issue today. Also I prefer to tell people to use middleware for all the compatibility hacks.