From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from mail-it0-f46.google.com (mail-it0-f46.google.com [209.85.214.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 4957E2019E for ; Thu, 14 Jul 2016 16:13:21 +0000 (UTC) Received: by mail-it0-f46.google.com with SMTP id f6so75124373ith.0 for ; Thu, 14 Jul 2016 09:13:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=9cagE8/AmMOzRKNxJFQYXOQeNUdWlivtJa60VgnOJTo=; b=LGXhPiHrR1XTUzv85jex4BuGWE+qIjMCmAXsjBfu1cpM5mSRjTHzECsPOJIRCG9O1y QRs7Re2+h4CaPXrP6wchr02WT5+h6AQ9Yr5vJ+cn/ob9AR3m9r58dzGSTKPhUTu5L7qc eVzH92JJL0WCL7ejvtyCSs80mLwKIOQES7yY0KBnHOTnM2w9jwye8oyYU8OnJOTr29Ce zqUo83cMYeg/98q/adNwUnCAepX08ssnOSitmBoh7dJY3XJYYUk0BqaAPnXQaAa/IOoP Bc4oUSx1GV2WghC1B86k72P4nf3S/sdy86YaKQgicll2bVkvSjhga4l8V2YMbyYbkpJO iDiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=9cagE8/AmMOzRKNxJFQYXOQeNUdWlivtJa60VgnOJTo=; b=lzKoSwrJ+Z7W3B0iFNlJH7RJGZoUT3gd2PJknIaAOKYl1KGaK4rmfaoGCAL3dtc/Eu J05pAhk+LdRaeKsiz1W/FQh2yPyjB0TmgVjhfxyxfv0WwBk01l5TUc6nzY3k3k6t1AgK Gtbc0oOC5OPKQMs/obUvmf5dHW7DIcmkPsdR+RZJ5EAqynQzKOh1lfq4eX0tHGHQut4m xzMtmve1wv5Z7ZOgHuS6SWlKDmpDlXI409fwxOO/SpwU3xop26jc5qp2Jr7IH5uxxba3 WejOTiwyk+nv/6vYCulsQh2DqEZ8nsq8Z4nG+VAjrcpUl/UvMYznYDxCMq4K9va74etv +YrQ== X-Gm-Message-State: ALyK8tJ/Kqe2OPyovMMuMqD7732PqpXHRq39QEJh0ywIKqaEioOEkOQ8I8RHN9Gp/BM4ZH6o60Pd7LldYO2TEg== X-Received: by 10.36.82.8 with SMTP id d8mr16297048itb.61.1468512800413; Thu, 14 Jul 2016 09:13:20 -0700 (PDT) MIME-Version: 1.0 Sender: daniel.r.kegel@gmail.com Received: by 10.36.65.69 with HTTP; Thu, 14 Jul 2016 09:13:19 -0700 (PDT) In-Reply-To: <20160713202431.GA10605@dcvr.yhbt.net> References: <20160713202431.GA10605@dcvr.yhbt.net> From: Dan Kegel Date: Thu, 14 Jul 2016 09:13:19 -0700 X-Google-Sender-Auth: hX7JkeZbgjTp-uDjcAWLgRNBJiA Message-ID: Subject: Re: issue between rainbows/unicorn 5.0.0 and rack on ruby >= 1.9.1 To: Eric Wong Cc: Kevin Mullican , rainbows-public@bogomips.org Content-Type: text/plain; charset=UTF-8 List-Id: On Wed, Jul 13, 2016 at 1:24 PM, Eric Wong 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