resolved
John Napiorkowski [Thu, 29 Oct 2015 20:11:25 +0000 (15:11 -0500)]
Changes
dist.ini
lib/Catalyst/Action/SerializeBase.pm

diff --git a/Changes b/Changes
index c88d7d4..bed7442 100644 (file)
--- 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
index 0943118..e649331 100644 (file)
--- a/dist.ini
+++ b/dist.ini
@@ -2,7 +2,7 @@ name             = Catalyst-Action-REST
 author           = Tomas Doran <bobtfish@cpan.org>
 license          = Perl_5
 copyright_holder = Tomas Doran
-version          = 1.19
+version          = 1.20
 
 [NextRelease]
 [@Git]
index 9f7a1ac..b901f61 100644 (file)
@@ -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);
     }