This is an automated email from the git hooks/post-receive script. js pushed a commit to annotated tag 0.07 in repository libdancer-plugin-rest-perl.
commit ae65b0a386fc7a08e4173cc302804f0169b4d597 Author: Alexis Sukrieh <ale...@weborama.com> Date: Fri Mar 4 11:59:05 2011 +0100 FIX content_types --- lib/Dancer/Plugin/REST.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/Dancer/Plugin/REST.pm b/lib/Dancer/Plugin/REST.pm index 8239a51..8d6679b 100644 --- a/lib/Dancer/Plugin/REST.pm +++ b/lib/Dancer/Plugin/REST.pm @@ -9,6 +9,12 @@ use Dancer::Plugin; our $AUTHORITY = 'SUKRIA'; our $VERSION = '0.04'; +my $content_types = { + json => 'application/json', + yml => 'text/x-yaml', + xml => 'application/xml', +}; + register prepare_serializer_for_format => sub { my $conf = plugin_setting; my $serializers = ( @@ -36,6 +42,8 @@ register prepare_serializer_for_format => sub { } set serializer => $serializer; + my $ct = $content_types->{$format} || setting('content_type'); + content_type $ct; }; }; -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdancer-plugin-rest-perl.git _______________________________________________ Pkg-perl-cvs-commits mailing list Pkg-perl-cvs-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits