@hono/node-server 1.19.1 → 1.19.2

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.
@@ -130,8 +130,8 @@ var serveStatic = (options = { root: "" }) => {
130
130
  c.header("Accept-Ranges", "bytes");
131
131
  c.header("Date", stats.birthtime.toUTCString());
132
132
  const parts = range.replace(/bytes=/, "").split("-", 2);
133
- const start = parts[0] ? parseInt(parts[0], 10) : 0;
134
- let end = parts[1] ? parseInt(parts[1], 10) : stats.size - 1;
133
+ const start = parseInt(parts[0], 10) || 0;
134
+ let end = parseInt(parts[1], 10) || size - 1;
135
135
  if (size < end - start + 1) {
136
136
  end = size - 1;
137
137
  }
@@ -106,8 +106,8 @@ var serveStatic = (options = { root: "" }) => {
106
106
  c.header("Accept-Ranges", "bytes");
107
107
  c.header("Date", stats.birthtime.toUTCString());
108
108
  const parts = range.replace(/bytes=/, "").split("-", 2);
109
- const start = parts[0] ? parseInt(parts[0], 10) : 0;
110
- let end = parts[1] ? parseInt(parts[1], 10) : stats.size - 1;
109
+ const start = parseInt(parts[0], 10) || 0;
110
+ let end = parseInt(parts[1], 10) || size - 1;
111
111
  if (size < end - start + 1) {
112
112
  end = size - 1;
113
113
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hono/node-server",
3
- "version": "1.19.1",
3
+ "version": "1.19.2",
4
4
  "description": "Node.js Adapter for Hono",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",