X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAction%2FSerializeBase.pm;h=b901f61eff6eadf441990161536263139652ebb0;hb=d6e51ea1ee172f9a7970f6d7523d6d14764b9105;hp=60ea05e9bc08a6f93acac7d967f3b60d4e177091;hpb=b3996af85ac6bea294c4d4b82167429f5694a694;p=catagits%2FCatalyst-Action-REST.git diff --git a/lib/Catalyst/Action/SerializeBase.pm b/lib/Catalyst/Action/SerializeBase.pm index 60ea05e..b901f61 100644 --- a/lib/Catalyst/Action/SerializeBase.pm +++ b/lib/Catalyst/Action/SerializeBase.pm @@ -8,9 +8,6 @@ use Module::Pluggable::Object; use Catalyst::Request::REST; use Catalyst::Utils (); -our $VERSION = '1.01'; -$VERSION = eval $VERSION; - after BUILDARGS => sub { my $class = shift; my $config = shift; @@ -121,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); }