From: Dan Kegel <dank@kegel.com>
To: Eric Wong <e@80x24.org>
Cc: Kevin Mullican <kmullican@oblong.com>, rainbows-public@bogomips.org
Subject: Re: issue between rainbows/unicorn 5.0.0 and rack on ruby >= 1.9.1
Date: Thu, 14 Jul 2016 09:13:19 -0700 [thread overview]
Message-ID: <CAPF-yOboMRRjzYhs5Mf955uoFu9j5CRBV=Uh6TRNgtDs1z9BRg@mail.gmail.com> (raw)
In-Reply-To: <20160713202431.GA10605@dcvr.yhbt.net>
On Wed, Jul 13, 2016 at 1:24 PM, Eric Wong <e@80x24.org> wrote:
> Actually, I believe the onus is on the application to produce a
> correct response body for the application server to use.
I work with Kevin, and helped track this down. Neither of us use Ruby
much, hence our difficulty.
I'm posting a followup here in case others in a similar spot happen
across this thread.
One problem was in our rackup.ru (I'll show a bit more code than
needed, to be kind to newbies):
class AppendSlash
def initialize(app, options={})
@app = app
@base = options[:base]
end
def call(env)
if env['REQUEST_URI'] == @base
[301, {
'Content-Type' => 'text/html',
'Location' => @base + '/'
}, '']
else
@app.call(env)
end
end
end
The fix was to change
}, '']
to
}, ['']]
Likewise, in a few of our apps, we had to change
[200, {
'Content-Type' => 'text/plain',
'Content-Length' => data.length.to_s
}, data
]
to
[200, {
'Content-Type' => 'text/plain',
'Content-Length' => data.length.to_s
}, [data]
]
The question was also asked at https://github.com/rack/rack/issues/1096
so I'll follow up there, too.
Thanks!
- Dan
next prev parent reply other threads:[~2016-07-14 16:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-13 19:51 issue between rainbows/unicorn 5.0.0 and rack on ruby >= 1.9.1 Kevin Mullican
2016-07-13 20:24 ` Eric Wong
2016-07-14 16:13 ` Dan Kegel [this message]
2016-07-14 22:17 ` Eric Wong
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/rainbows/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPF-yOboMRRjzYhs5Mf955uoFu9j5CRBV=Uh6TRNgtDs1z9BRg@mail.gmail.com' \
--to=dank@kegel.com \
--cc=e@80x24.org \
--cc=kmullican@oblong.com \
--cc=rainbows-public@bogomips.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/rainbows.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).