From c2ec9827cd1c025bd09770cabe4ab4b385e8a80f Mon Sep 17 00:00:00 2001
From: WhatFox <whatfox@email.not.public>
Date: Tue, 15 Dec 2015 23:27:13 +0000
Subject: [PATCH] Fix webui on mono 3.x.  Please don't use 3.x :(

---
 src/Jackett/CacheControlAttribute.cs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/Jackett/CacheControlAttribute.cs b/src/Jackett/CacheControlAttribute.cs
index 915d2f74..d60afba6 100644
--- a/src/Jackett/CacheControlAttribute.cs
+++ b/src/Jackett/CacheControlAttribute.cs
@@ -11,6 +11,9 @@ namespace Jackett
     {
         public override void OnActionExecuted(HttpActionExecutedContext actionExecutedContext)
         {
+            if(null!= actionExecutedContext && 
+               null!= actionExecutedContext.Response && 
+               null!= actionExecutedContext.Response.Headers)
             actionExecutedContext.Response.Headers.CacheControl = new System.Net.Http.Headers.CacheControlHeaderValue()
             {
                 NoStore = true,
-- 
GitLab