Open tc opened 12 years ago
I'm getting the same errors on our logs on Heroku (Cedar stack).
Removing the my entire bundle & cache fixed this for me.
I'm seeing this as well. Looks like it's possibly for any request with URL encoded Latin-1 in it, e.g.
cache error: invalid byte sequence in UTF-8
…
cache: [GET /kalix?q=sn%F6slunga] pass
Okay, I ended up doing this for now. Admittedly a kludge (and only for Ruby 1.9):
# Make Rack::Cache not break on Latin-1 query params.
# https://github.com/rtomayko/rack-cache/issues/47
class Rack::Cache::Key
def unescape(x)
super(x).encode("UTF-8", "ISO8859-1")
end
def escape(x)
super(x.encode("ISO8859-1", "UTF-8")).encode("UTF-8", "ISO8859-1")
end
end
In my case, I can rely on (I hope) query parameters to always be Latin-1 (ISO 8859-1), so this solution should work. Shouldn't be that hard to come up with a general solution, though – may give it a go.
Anyone have a general solution for this problem? We're also seeing this issue.
Am also seeing this in our unicorn logs. Very strange.
See same error a lot in the unicorn log file.
I feel like I've seen this, but not in a while. Have you tried adding the # encoding: utf-8
magic comment to the top of your config.ru
or other relevant files?
I'm seeing a lot of these errors in our logs: