Closed AlessandroMinali closed 4 years ago
Thanks for reporting it with a repository for reproduction.
Unfortunately, I couldn't reproduce the issue on my machine. Could you please also share:
p ENV['LANG']
and p Encoding.default_external
in the sinatra codeJust using a simple string like "test" produces the error for me.
I added the output to the template: https://github.com/AlessandroMinali/hamlit-bug/commit/b6e258737b526609d51b8e0e8878300ab9ade5d4
My result is:
ENV['LANG'] == nil
and Encoding.default_external == #<Encoding:UTF-8>
Also:
$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
Thanks for the additional information. But even with the information I still can't reproduce the problem.
Could you prepare Dockerfile which has an environment similar to yours and reproduces the problem? I'm not familiar with Rack::Lint
and it's hard to resolve the issue without a reproductive environment.
I did a clean ruby and gem install and the problem has gone away for now. If it comes up again I will provide a dockerfile.
Thanks for the replies.
Summary: Occuring when using
hamlit
and POST requests. I made a repo to reproduce the bug: https://github.com/AlessandroMinali/hamlit-bug Switching to usehaml
the bug disappears. I recently moved to ruby2.7.0 and fresh installed all gems then started noticing this.Full error backtrace:
Haml template:
Ruby version:
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin18]
Hamlit version:
Rails/Sinatra version:
sinatra (2.0.8.1)