Environment Versions
- OS Type: Ubuntu 22.04.01 LTS
- Node version: node version unavailable. bun version 1.3.11
- http-server version: 14.1.1
Steps to reproduce
bun install -g http-server
http-server -d false -i
curl http://localhost:8080
Expected result
Maybe 404? But at least capture the exception and keep serving the host.
Actual result
~# http-server -d false -i
Starting up http-server, serving ./
http-server version: 14.1.1
http-server settings:
CORS: disabled
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: not visible
AutoIndex: not visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none
<After curl the service>
48 |
49 | if (this.response) {
50 | this._headers = this.response._headers = this.response._headers || {};
51 |
52 | // Patch to node core
53 | this.response._headerNames = this.response._headerNames || {};
^
TypeError: Attempted to assign to readonly property.
at <anonymous> (node:_http_outgoing:360:17)
at new (/root/.bun/install/global/node_modules/union/lib/response-stream.js:53:10)
at new (/root/.bun/install/global/node_modules/union/lib/routing-stream.js:30:17)
at requestHandler (/root/.bun/install/global/node_modules/union/lib/core.js:27:25)
at emit (node:events:98:22)
at onNodeHTTPRequest (node:_http_server:367:22)
DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
code: "DEP0066"
at <anonymous> (internal:util/deprecate:9:30)
at deprecated (internal:util/deprecate:20:29)
at new (/root/.bun/install/global/node_modules/union/lib/response-stream.js:50:51)
at new (/root/.bun/install/global/node_modules/union/lib/routing-stream.js:30:17)
at requestHandler (/root/.bun/install/global/node_modules/union/lib/core.js:27:25)
at emit (node:events:98:22)
at onNodeHTTPRequest (node:_http_server:367:22)
Bun v1.3.11 (Linux x64)
After the error log, this process is self-terminated.
Other information
Environment Versions
Steps to reproduce
bun install -g http-serverhttp-server -d false -icurl http://localhost:8080Expected result
Maybe 404? But at least capture the exception and keep serving the host.
Actual result
After the error log, this process is self-terminated.
Other information