From 475865e613ee3aebfc73449db920da1bfd1111be Mon Sep 17 00:00:00 2001
From: Mike Perham <mperham@gmail.com>
Date: Wed, 1 Feb 2017 10:51:35 -0800
Subject: [PATCH] Ensure content-type is always set, fixes #3338

---
 lib/sidekiq/web/application.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/sidekiq/web/application.rb b/lib/sidekiq/web/application.rb
index 56c13979..a48a7307 100644
--- a/lib/sidekiq/web/application.rb
+++ b/lib/sidekiq/web/application.rb
@@ -281,7 +281,7 @@ module Sidekiq
         when :json
           { "Content-Type" => "application/json", "Cache-Control" => "no-cache" }
         when String
-          { "Content-Type" => action.type, "Cache-Control" => "no-cache" }
+          { "Content-Type" => (action.type || "text/html"), "Cache-Control" => "no-cache" }
         else
           { "Content-Type" => "text/html", "Cache-Control" => "no-cache" }
         end