Better caching
Based on @trinity-1686a's patch: https://github.com/Plume-org/Plume/issues/786#issuecomment-647170325
This commit is contained in:
parent
28576c1fa3
commit
90fdade566
@ -63,7 +63,7 @@ impl<'r> Responder<'r> for Ructe {
|
|||||||
let etag = format!("{:x}", hasher.finish());
|
let etag = format!("{:x}", hasher.finish());
|
||||||
if r.headers()
|
if r.headers()
|
||||||
.get("If-None-Match")
|
.get("If-None-Match")
|
||||||
.any(|s| s[1..s.len() - 1] == etag)
|
.any(|s| s[1..s.len() - 1] == etag || s[3..s.len() - 1] == etag)
|
||||||
{
|
{
|
||||||
Response::build()
|
Response::build()
|
||||||
.status(Status::NotModified)
|
.status(Status::NotModified)
|
||||||
|
Loading…
Reference in New Issue
Block a user