mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-30 19:50:15 -07:00
properly respond to IfModifiedSince headers. should improve caching
This commit is contained in:
parent
d339d1208f
commit
00c32cbb35
2 changed files with 13 additions and 2 deletions
|
@ -48,6 +48,13 @@ namespace NzbDrone.Api.Frontend
|
|||
return null;
|
||||
}
|
||||
|
||||
if (context.Request.Headers.IfModifiedSince.HasValue)
|
||||
{
|
||||
var response = new Response { ContentType = MimeTypes.GetMimeType(path), StatusCode = HttpStatusCode.NotModified };
|
||||
_addCacheHeaders.ToResponse(context.Request, response);
|
||||
return response;
|
||||
}
|
||||
|
||||
var mapper = _requestMappers.SingleOrDefault(m => m.CanHandle(path));
|
||||
|
||||
if (mapper != null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue