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

Regression on handling images with non-ASCII chars in filename #187

Open
zigarn opened this issue May 29, 2023 · 0 comments
Open

Regression on handling images with non-ASCII chars in filename #187

zigarn opened this issue May 29, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@zigarn
Copy link
Contributor

zigarn commented May 29, 2023

Last automatic build of training-continuous-integration suddenly failed: https://app.circleci.com/pipelines/github/Zenika-Training/training-continuous-integration/213/workflows/2e616255-b848-41df-8955-21a6b3ec7375/jobs/512

Loading page http://localhost:35903/slides.html ...
/app/src/cli/cli.js:187
  throw err;
  ^

TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["Content-Disposition"]
    at storeHeader (node:_http_outgoing:573:5)
    at processHeader (node:_http_outgoing:568:3)
    at ServerResponse._storeHeader (node:_http_outgoing:449:11)
    at ServerResponse.writeHead (node:_http_server:417:8)
    at module.exports (/app/node_modules/serve-handler/src/index.js:754:11) {
  code: 'ERR_INVALID_CHAR'
}

After a bit of debug, found that the issue comes from header 'Content-Disposition': 'inline; filename="Processus-intégration-livraison-5c96e38fe490eab5178d..png"', so with é in path.

Looks like latest build of sensei changed behavior on handling non-ASCII chars in filename.

Example on how removing non-ASCII chars in filenames fixes the problem: https://github.com/Zenika-Training/training-continuous-integration/commit/60d97613f786bbbd079a09d0baf81599277271b2

@zigarn zigarn added the bug Something isn't working label May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant