[Catalyst] Response Headers

2011-03-28 Thread John M. Dlugosz

Where is Content-Type being set?

I'd like to send it instead as application/xhtml+xml, if the Accept header of the request 
claims to take that.  I found this example of rewriting it in Apache, but it would be far 
easier to target the necessary pages, not to mention more elegant, if I did this within 
Catalyst.


|   AddType text/html .xhtml
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml
RewriteCond %{HTTP_ACCEPT} !application/xhtml\+xml\s*;\s*q=0
RewriteCond %{REQUEST_URI} \.xhtml$
RewriteCond %{THE_REQUEST} HTTP/1\.1
RewriteRule .* - [T=application/xhtml+xml]|



___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Response Headers

2011-03-28 Thread Denny
On Mon, 2011-03-28 at 08:12 -0500, John M. Dlugosz wrote:
 Where is Content-Type being set?
 
 I'd like to send it instead as application/xhtml+xml, if the Accept header of 
 the request 
 claims to take that.

Catalyst::View::TT::XHTML

Regards,
Denny



signature.asc
Description: This is a digitally signed message part
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/