X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Action-REST.git;a=blobdiff_plain;f=lib%2FCatalyst%2FAction%2FSerializeBase.pm;fp=lib%2FCatalyst%2FAction%2FSerializeBase.pm;h=b901f61eff6eadf441990161536263139652ebb0;hp=9f7a1ac86ffacd595ed572dda8e1fc7318f1307b;hb=d6e51ea1ee172f9a7970f6d7523d6d14764b9105;hpb=b4afc96bde8e243f4cc2396c7740977a231fb3bd 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); }