浏览代码

add expires response header

Luke Pulverenti 8 年之前
父节点
当前提交
55a53cfab7
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs

+ 5 - 3
MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs

@@ -93,12 +93,14 @@ namespace MediaBrowser.Server.Implementations.HttpServer
                     }
                 }
             }
-
-            if (responseHeaders != null)
+            if (responseHeaders == null)
             {
-                AddResponseHeaders(result, responseHeaders);
+                responseHeaders = new Dictionary<string, string>();
             }
 
+            responseHeaders["Expires"] = "-1";
+            AddResponseHeaders(result, responseHeaders);
+
             return result;
         }