From: John Napiorkowski Date: Thu, 29 Oct 2015 20:11:25 +0000 (-0500) Subject: resolved X-Git-Tag: v1.20~2^2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Action-REST.git;a=commitdiff_plain;h=d6e51ea1ee172f9a7970f6d7523d6d14764b9105;hp=b4afc96bde8e243f4cc2396c7740977a231fb3bd resolved --- diff --git a/Changes b/Changes index c88d7d4..bed7442 100644 --- a/Changes +++ b/Changes @@ -2,8 +2,6 @@ Revision history for {{$dist->name}} {{$NEXT}} - - Fix docs citing incorrect method name: 'serialize_bad_request' (remove leading underscore) - 1.19 2015-02-06 09:40:02-06:00 America/Chicago - Make LWP a test dep instead of a hard dep (Fixes GH#3, thanks Alexander diff --git a/dist.ini b/dist.ini index 0943118..e649331 100644 --- a/dist.ini +++ b/dist.ini @@ -2,7 +2,7 @@ name = Catalyst-Action-REST author = Tomas Doran license = Perl_5 copyright_holder = Tomas Doran -version = 1.19 +version = 1.20 [NextRelease] [@Git] diff --git a/lib/Catalyst/Action/SerializeBase.pm b/lib/Catalyst/Action/SerializeBase.pm index 9f7a1ac..b901f61 100644 --- a/lib/Catalyst/Action/SerializeBase.pm +++ b/lib/Catalyst/Action/SerializeBase.pm @@ -118,10 +118,12 @@ sub _load_content_plugins { } if ($search_path eq "Catalyst::Action::Serialize") { - if ($content_type) { - $c->response->header( 'Vary' => 'Content-Type' ); - } elsif ($c->request->accept_only) { - $c->response->header( 'Vary' => 'Accept' ); + unless( $c->response->header( 'Vary' ) ) { + if ($content_type) { + $c->response->header( 'Vary' => 'Content-Type' ); + } elsif ($c->request->accept_only) { + $c->response->header( 'Vary' => 'Accept' ); + } } $c->response->content_type($content_type); }