@hono/node-server 1.13.0 → 1.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/serve-static.js +1 -3
- package/dist/serve-static.mjs +1 -3
- package/package.json +1 -1
package/dist/serve-static.js
CHANGED
|
@@ -95,9 +95,7 @@ var serveStatic = (options = { root: "" }) => {
|
|
|
95
95
|
}
|
|
96
96
|
await options.onFound?.(path, c);
|
|
97
97
|
const mimeType = (0, import_mime.getMimeType)(path);
|
|
98
|
-
|
|
99
|
-
c.header("Content-Type", mimeType);
|
|
100
|
-
}
|
|
98
|
+
c.header("Content-Type", mimeType || "application/octet-stream");
|
|
101
99
|
if (options.precompressed && (!mimeType || COMPRESSIBLE_CONTENT_TYPE_REGEX.test(mimeType))) {
|
|
102
100
|
const acceptEncodingSet = new Set(
|
|
103
101
|
c.req.header("Accept-Encoding")?.split(",").map((encoding) => encoding.trim())
|
package/dist/serve-static.mjs
CHANGED
|
@@ -71,9 +71,7 @@ var serveStatic = (options = { root: "" }) => {
|
|
|
71
71
|
}
|
|
72
72
|
await options.onFound?.(path, c);
|
|
73
73
|
const mimeType = getMimeType(path);
|
|
74
|
-
|
|
75
|
-
c.header("Content-Type", mimeType);
|
|
76
|
-
}
|
|
74
|
+
c.header("Content-Type", mimeType || "application/octet-stream");
|
|
77
75
|
if (options.precompressed && (!mimeType || COMPRESSIBLE_CONTENT_TYPE_REGEX.test(mimeType))) {
|
|
78
76
|
const acceptEncodingSet = new Set(
|
|
79
77
|
c.req.header("Accept-Encoding")?.split(",").map((encoding) => encoding.trim())
|