mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-28 21:12:43 +02:00
properly respond to IfModifiedSince headers. should improve caching
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user