From: Eric Wong <normalperson@yhbt.net>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Cc: Lucas Parry <lucas@envato.com>
Subject: Re: Bug in unicorn_rails when Encoding.default_internal is set
Date: Fri, 17 Feb 2012 03:59:20 +0000 [thread overview]
Message-ID: <20120217035920.GA31001@dcvr.yhbt.net> (raw)
In-Reply-To: <CAMXxzZtdxutLeAPUzd+1s7Mdt1in9CJ-U2NHYyM9_+pma2E-_Q@mail.gmail.com>
Lucas Parry <lucas@envato.com> wrote:
> On Fri, Feb 17, 2012 at 1:29 PM, Lucas Parry <lucas@envato.com> wrote:
> > We recently made the switch to 1.9 for our large rails 2.3.14 project
(odd, neither I nor gmane got your original message:
http://rubyforge.org/pipermail/mongrel-unicorn/2012-February/001310.html
Perhaps Mailman misdelivers UTF-8...
)
> I guess I should be more precise; This problem is occurring on MRI1.9.2-p290
Setting Encoding.default_* is probably a bad idea in your app.
If you run Ruby with warnings (-w switch), you'll see setting
Encoding.default_* will generate warnings to discourage their use.
If you want UTF-8, set LANG=en_US.UTF-8 in the environment _before_
starting Ruby, which will only set Encoding.default_external.
I've always just left Encoding.default_internal alone. I'll let others
on the list with more Rails/encoding experience help you with that.
> All subsequent requests to that worker will fail with the same
> exception.
Seems to be Rails bug. Rails 3.2.1 seems to handle the situation
without difficulty.
Fwiw, neither Rack nor HTTP specify an encoding for HTTP headers/paths.
The only place where encoding is specified for Rack is "rack.input",
which must be binary. There was talk on the Rack mailing list a long
while back about enforcing encodings for certain headers, but nothing
came of it.
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
prev parent reply other threads:[~2012-02-17 6:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-17 2:29 Bug in unicorn_rails when Encoding.default_internal is set Lucas Parry
2012-02-17 2:37 ` Lucas Parry
2012-02-17 3:59 ` Eric Wong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/unicorn/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120217035920.GA31001@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=lucas@envato.com \
--cc=mongrel-unicorn@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/unicorn.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).