[Jifty-commit] r1709 -
jifty/trunk/plugins/REST/lib/Jifty/Plugin/REST
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sun Jul 30 14:15:08 EDT 2006
Author: audreyt
Date: Sun Jul 30 14:15:06 2006
New Revision: 1709
Modified:
jifty/trunk/plugins/REST/lib/Jifty/Plugin/REST/Dispatcher.pm
Log:
* MIME type fixup:
application/json
application/x-perl
text/x-yaml
Modified: jifty/trunk/plugins/REST/lib/Jifty/Plugin/REST/Dispatcher.pm
==============================================================================
--- jifty/trunk/plugins/REST/lib/Jifty/Plugin/REST/Dispatcher.pm (original)
+++ jifty/trunk/plugins/REST/lib/Jifty/Plugin/REST/Dispatcher.pm Sun Jul 30 14:15:06 2006
@@ -52,12 +52,12 @@
} @$prefix);
if ($accept =~ /ya?ml/i) {
- $apache->header_out('Content-Type' => 'text/yaml; charset=UTF-8');
+ $apache->header_out('Content-Type' => 'text/x-yaml; charset=UTF-8');
$apache->send_http_header;
print Jifty::YAML::Dump(@_);
}
elsif ($accept =~ /json/i) {
- $apache->header_out('Content-Type' => 'text/json; charset=UTF-8');
+ $apache->header_out('Content-Type' => 'application/json; charset=UTF-8');
$apache->send_http_header;
print Jifty::JSON::objToJson( @_, { singlequote => 1 } );
}
@@ -67,7 +67,7 @@
print 'var $_ = ', Jifty::JSON::objToJson( @_, { singlequote => 1 } );
}
elsif ($accept =~ /perl/i) {
- $apache->header_out('Content-Type' => 'application/perl; charset=UTF-8');
+ $apache->header_out('Content-Type' => 'application/x-perl; charset=UTF-8');
$apache->send_http_header;
print Data::Dumper::Dumper(@_);
}
More information about the Jifty-commit
mailing list