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

IPX crashes with ERR_INVALID_CHAR #42

Closed
phof opened this issue Jul 28, 2021 · 3 comments
Closed

IPX crashes with ERR_INVALID_CHAR #42

phof opened this issue Jul 28, 2021 · 3 comments

Comments

@phof
Copy link

phof commented Jul 28, 2021

Steps to reproduce:

  1. Start IPX, npx ipx
  2. Submit a request such as GET /test/%00, or GET /test/%01, etc
  3. IPX crashes with error:
node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^

TypeError [ERR_INVALID_CHAR]: Invalid character in statusMessage
    at new NodeError (node:internal/errors:363:5)
    at ServerResponse.writeHead (node:_http_server:323:11)
    at ServerResponse._implicitHeader (node:_http_server:266:8)
    at write_ (node:_http_outgoing:764:9)
    at ServerResponse.end (node:_http_outgoing:853:5)
    at /ipxissue/node_modules/ipx/dist/cli.js:543:11 {
  code: 'ERR_INVALID_CHAR'
}

This is impacting nuxt/image and thus any apps using it.
I haven't had a chance to review IPX's source; will look tomorrow and submit a PR if I can get to the bottom of it.

@phof
Copy link
Author

phof commented Jul 28, 2021

cc/ @pi0

@pi0
Copy link
Member

pi0 commented Jul 28, 2021

Hi @phof. Thanks for reporting the issue. Is there a chance you can also make a reproduction from this sandbox and submit to nuxt/image? This way we can check to fix all possible root causes.

BTW PR is always welcome! <3

@pi0
Copy link
Member

pi0 commented Jun 20, 2022

Hi. Finally coming back to this issue. It should be resolved in the next release with 1792d3a (and dee7308)

The similar reported issue nuxt/image#376 with headers and file operator is also mitigated (there is no server error anymore).

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