spooder 5.1.7 → 5.1.8

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/api.ts +6 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "spooder",
3
3
  "type": "module",
4
- "version": "5.1.7",
4
+ "version": "5.1.8",
5
5
  "module": "./src/api.ts",
6
6
  "bin": {
7
7
  "spooder": "./src/cli.ts"
package/src/api.ts CHANGED
@@ -1573,7 +1573,12 @@ export function http_serve(port: number, hostname?: string) {
1573
1573
  return cache.request(req, `error_${status_code}`, create_error_content_generator(status_code), status_code);
1574
1574
  } else {
1575
1575
  const content = await create_error_content_generator(status_code)();
1576
- return new Response(content, { status: status_code });
1576
+ return new Response(content, {
1577
+ status: status_code,
1578
+ headers: {
1579
+ 'content-type': 'text/html'
1580
+ }
1581
+ });
1577
1582
  }
1578
1583
  };
1579
1584