mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-12-24 11:00:34 +00:00
Merge branch 'main' into update-dockerfile-dev
This commit is contained in:
commit
961806247c
1 changed files with 4 additions and 1 deletions
|
@ -63,7 +63,10 @@ impl<'r> Responder<'r> for Ructe {
|
|||
let etag = format!("{:x}", hasher.finish());
|
||||
if r.headers()
|
||||
.get("If-None-Match")
|
||||
.any(|s| s[1..s.len() - 1] == etag)
|
||||
// This check matches both weak and strong ETags
|
||||
// NGINX (and maybe other software) sometimes sends ETags with a
|
||||
// "W/" prefix, that we ignore here
|
||||
.any(|s| s[1..s.len() - 1] == etag || s[3..s.len() - 1] == etag)
|
||||
{
|
||||
Response::build()
|
||||
.status(Status::NotModified)
|
||||
|
|
Loading…
Reference in a new issue