@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.
@@ -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
- if (mimeType) {
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())
@@ -71,9 +71,7 @@ var serveStatic = (options = { root: "" }) => {
71
71
  }
72
72
  await options.onFound?.(path, c);
73
73
  const mimeType = getMimeType(path);
74
- if (mimeType) {
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())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hono/node-server",
3
- "version": "1.13.0",
3
+ "version": "1.13.1",
4
4
  "description": "Node.js Adapter for Hono",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",