mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
Use MaterialisingResponse for static resource responses
This commit is contained in:
parent
70f7404499
commit
a0d98951aa
@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using NLog;
|
using NLog;
|
||||||
using Nancy;
|
using Nancy;
|
||||||
@ -38,7 +38,7 @@ public virtual Response GetResponse(string resourceUrl)
|
|||||||
if (_diskProvider.FileExists(filePath, _caseSensitive))
|
if (_diskProvider.FileExists(filePath, _caseSensitive))
|
||||||
{
|
{
|
||||||
var response = new StreamResponse(() => GetContentStream(filePath), MimeTypes.GetMimeType(filePath));
|
var response = new StreamResponse(() => GetContentStream(filePath), MimeTypes.GetMimeType(filePath));
|
||||||
return response;
|
return new MaterialisingResponse(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.Warn("File {0} not found", filePath);
|
_logger.Warn("File {0} not found", filePath);
|
||||||
|
Loading…
Reference in New Issue
Block a user