summaryrefslogtreecommitdiff
path: root/src/handler/staticfile.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/handler/staticfile.rs')
-rw-r--r--src/handler/staticfile.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/handler/staticfile.rs b/src/handler/staticfile.rs
index 871f414..969c4d7 100644
--- a/src/handler/staticfile.rs
+++ b/src/handler/staticfile.rs
@@ -43,11 +43,13 @@ impl Handle for StaticFile {
} else {
Ok(Response::builder()
.status(Status::NotFound)
+ .headers([("content-length", "0")])
.body(Body::Empty))
}
}
Err(e) if matches!(e.kind(), io::ErrorKind::NotFound) => Ok(Response::builder()
.status(Status::NotFound)
+ .headers([("content-length", "0")])
.body(Body::Empty)),
Err(e) => Err(Error::Io(e))?,
},