Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERR_INVALID_CHAR when browse localhost:8080 #97

Open
xLinkOut opened this issue Jan 6, 2021 · 1 comment
Open

ERR_INVALID_CHAR when browse localhost:8080 #97

xLinkOut opened this issue Jan 6, 2021 · 1 comment

Comments

@xLinkOut
Copy link

xLinkOut commented Jan 6, 2021

After npm install and npm start the webserver starts normally

luca Crypto-Touchbar-App (master) > npm start
> [email protected] start
> node node_modules/watch-http-server/bin/http-server
Websocket Server Listening on Port: 8086
Starting up http-server, serving ./ on: http://0.0.0.0:8080

But when browse http://0.0.0.0:8080 the server crash with:

node:_http_outgoing:557
    throw new ERR_INVALID_CHAR('header content', name);
    ^

TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["etag"]
    at ServerResponse.setHeader (node:_http_outgoing:566:3)
    at module.exports.ResponseStream.<computed> [as setHeader] (/Users/luca/Desktop/Crypto-Touchbar-App/node_modules/union/lib/response-stream.js:100:34)
    at serve (/Users/luca/Desktop/Crypto-Touchbar-App/node_modules/sexstatic/lib/sexstatic.js:248:11)
    at /Users/luca/Desktop/Crypto-Touchbar-App/node_modules/sexstatic/lib/sexstatic.js:177:11
    at FSReqCallback.oncomplete (node:fs:200:5) {
  code: 'ERR_INVALID_CHAR'
}

I managed to get it to work commenting line 248 in sexstatic.js

      //res.setHeader('etag', etag(stat));

(node 15.5.1 / npm 7.3.0)

@chrislennon
Copy link
Owner

Hey @xLinkOut thanks for that, further to my comment here I suspect this is due to the node version. When I get around to any updates I'll check the compatibility with newer node versions - If I recall this was targetting 10.x or 12.x

Thanks once again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants