X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAction%2FSerializeBase.pm;h=b901f61eff6eadf441990161536263139652ebb0;hb=64ffc38be4c6693300e073fe3df3e2b718273be6;hp=061e7ca929e4875e858742e457345ac8a4cb8d66;hpb=5cb0b36f518a1f5e9c2225eec3187416319e8eec;p=catagits%2FCatalyst-Action-REST.git diff --git a/lib/Catalyst/Action/SerializeBase.pm b/lib/Catalyst/Action/SerializeBase.pm index 061e7ca..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.11'; -$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); }