diff options
| author | LukePulverenti <luke.pulverenti@gmail.com> | 2013-03-08 16:06:02 -0500 |
|---|---|---|
| committer | LukePulverenti <luke.pulverenti@gmail.com> | 2013-03-08 16:06:02 -0500 |
| commit | 34cc4eee9d35b5afa3116292a4f38f1703d42cae (patch) | |
| tree | 185dbcb1bb6263111030643c1259b3132f57d6b5 /MediaBrowser.Server.Implementations/HttpServer/BaseRestService.cs | |
| parent | 9ffb44244cbe59bea524989ab9edd395fed7e9a4 (diff) | |
more updates for api docs
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer/BaseRestService.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/HttpServer/BaseRestService.cs | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/BaseRestService.cs b/MediaBrowser.Server.Implementations/HttpServer/BaseRestService.cs index ef9483b6e..cdb6adbe7 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/BaseRestService.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/BaseRestService.cs @@ -83,7 +83,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer var key = cacheKey.ToString("N"); - var result = PreProcessCachedResult(cacheKey, key, lastDateModified, cacheDuration, string.Empty); + var result = PreProcessCachedResult(cacheKey, key, lastDateModified, cacheDuration); if (result != null) { @@ -117,9 +117,11 @@ namespace MediaBrowser.Server.Implementations.HttpServer throw new ArgumentNullException("factoryFn"); } + Response.ContentType = contentType; + var key = cacheKey.ToString("N"); - var result = PreProcessCachedResult(cacheKey, key, lastDateModified, cacheDuration, contentType); + var result = PreProcessCachedResult(cacheKey, key, lastDateModified, cacheDuration); if (result != null) { @@ -183,7 +185,9 @@ namespace MediaBrowser.Server.Implementations.HttpServer var key = cacheKey.ToString("N"); - var result = PreProcessCachedResult(cacheKey, key, lastDateModified, cacheDuration, contentType); + Response.ContentType = contentType; + + var result = PreProcessCachedResult(cacheKey, key, lastDateModified, cacheDuration); if (result != null) { @@ -278,9 +282,8 @@ namespace MediaBrowser.Server.Implementations.HttpServer /// <param name="cacheKeyString">The cache key string.</param> /// <param name="lastDateModified">The last date modified.</param> /// <param name="cacheDuration">Duration of the cache.</param> - /// <param name="contentType">Type of the content.</param> /// <returns>System.Object.</returns> - private object PreProcessCachedResult(Guid cacheKey, string cacheKeyString, DateTime? lastDateModified, TimeSpan? cacheDuration, string contentType) + private object PreProcessCachedResult(Guid cacheKey, string cacheKeyString, DateTime? lastDateModified, TimeSpan? cacheDuration) { Response.AddHeader("ETag", cacheKeyString); @@ -290,11 +293,6 @@ namespace MediaBrowser.Server.Implementations.HttpServer AddExpiresHeader(cacheKeyString, cacheDuration); //ctx.Response.SendChunked = false; - if (!string.IsNullOrEmpty(contentType)) - { - Response.ContentType = contentType; - } - Response.StatusCode = 304; return new byte[]{}; |
