fix: ServeStatic with zero bytes files

This commit is contained in:
Bobby Wibowo 2022-07-31 14:17:06 +07:00
parent bea63b07d8
commit d40d1e396f
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF

View File

@ -255,6 +255,10 @@ class ServeStatic {
return res.end()
}
if (len === 0) {
res.end()
}
return this.#stream(req, res, fullPath, opts, len)
}