From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.204.72.79 with SMTP id l15cs140621bkj; Mon, 29 Jun 2009 08:16:35 -0700 (PDT) Received-SPF: pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.100.216.12 as permitted sender) client-ip=10.100.216.12; Authentication-Results: mr.google.com; spf=pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.100.216.12 as permitted sender) smtp.mail=grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com; dkim=pass header.i=grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com Received: from mr.google.com ([10.100.216.12]) by 10.100.216.12 with SMTP id o12mr12830066ang.5.1246288592526 (num_hops = 1); Mon, 29 Jun 2009 08:16:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:received:x-sender:x-apparently-to :received:received:received-spf:authentication-results:received :dkim-signature:domainkey-signature:mime-version:received :in-reply-to:references:date:message-id:subject:from:to:content-type :content-transfer-encoding:reply-to:sender:precedence:x-google-loop :mailing-list:list-id:list-post:list-help:list-unsubscribe :x-beenthere-env:x-beenthere; bh=dAca7oxevRQG5OiPd/3HL6xResGFqLU0I030sdWcjzY=; b=DbFSHUfNcTsoZJuwJA4SklvFS42s5aNOE0MydcuO8AgsVZJLTkUn2/OZUZjTvzQSmT ETaqF6BTp86nRdxgON2NbHLGJWTKdMov/O8PQ6ivvJYXG2Nn5YVUJ/rE1BmwEP4ZMjVm Q0YBzumreiYHUyiq3TDygtBDbZEbJWm1BoQrI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:received-spf:authentication-results :dkim-signature:domainkey-signature:mime-version:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding:reply-to:sender:precedence:x-google-loop :mailing-list:list-id:list-post:list-help:list-unsubscribe :x-beenthere-env:x-beenthere; b=aoMsdM3Gc7NUyWGIoK2Fpf7cBBeuv3Qg7EUk2Is58vD5lQGP87/AWUCh27hQ8ySiu1 qNdu6q/bMtvEe95eLj55kNS3K5yF6EN0PRgAQoKidQJuDfXCrIsDzYSwvPEBDPEsEwpC BU2mmn6SwBLPPB2YTclgxXJ0MV4y6ysgNK8mc= Received: by 10.100.216.12 with SMTP id o12mr1795924ang.5.1246288583758; Mon, 29 Jun 2009 08:16:23 -0700 (PDT) Received: by 10.177.124.26 with SMTP id b26gr1470yqn.0; Mon, 29 Jun 2009 08:16:15 -0700 (PDT) X-Sender: judofyr@gmail.com X-Apparently-To: rack-devel@googlegroups.com Received: by 10.204.56.148 with SMTP id y20mr91888bkg.9.1246288574278; Mon, 29 Jun 2009 08:16:14 -0700 (PDT) Return-Path: Received: from mail-fx0-f222.google.com (mail-fx0-f222.google.com [209.85.220.222]) by gmr-mx.google.com with ESMTP id 14si768974fxm.7.2009.06.29.08.16.13; Mon, 29 Jun 2009 08:16:13 -0700 (PDT) Received-SPF: pass (google.com: domain of judofyr@gmail.com designates 209.85.220.222 as permitted sender) client-ip=209.85.220.222; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of judofyr@gmail.com designates 209.85.220.222 as permitted sender) smtp.mail=judofyr@gmail.com; dkim=pass (test mode) header.i=@gmail.com Received: by fxm22 with SMTP id 22so4015122fxm.8 for ; Mon, 29 Jun 2009 08:16:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=YWWndwX8UX+V22e5QOblnzHpdbHKsqT6USFsl8pXepc=; b=uWP5QDFZ6mrfLI6NzOUAUQF+iwRIgMVXg27W7CHpJOf8lZnOIGnv3u31PapD8vN+Ok qXJE4gXYc4ffIVYWQsRkXi0NQ23XmzraJ/MYJEbcNUcj4tMujW6pDmp0ZM/fvNpCbpUf g9BYRSlNB0smatTGA6JxyJIG7RvlzqOUaxJ7o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=smm1QZtOaJruYWyPaTFzcatBV+d0b85C1f9iEAS7iNmxCiE/1i5+yjGD5BDTbVtamp 58xDAS4hcUsGc23wSnUf1CjixIJscRcrQ7XUMHxK0Q5U9kQ6EYUeDTK2DnUesiVuZtKj kem2hJojfPsXmG33iDNq6JezCQpFukbZ+FaS8= MIME-Version: 1.0 Received: by 10.103.167.14 with SMTP id u14mr4177356muo.55.1246288573141; Mon, 29 Jun 2009 08:16:13 -0700 (PDT) In-Reply-To: <694b2ab5-2bb7-4d77-8b3c-976dde14eeb7@b14g2000yqd.googlegroups.com> References: <694b2ab5-2bb7-4d77-8b3c-976dde14eeb7@b14g2000yqd.googlegroups.com> Date: Mon, 29 Jun 2009 17:16:13 +0200 Message-ID: <391a49da0906290816l38773a99u73471f88724a6b63@mail.gmail.com> Subject: Re: Rack::Lint - Content-Length is nil in Passenger From: Magnus Holm To: rack-devel@googlegroups.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Reply-To: rack-devel@googlegroups.com Sender: rack-devel@googlegroups.com Precedence: bulk X-Google-Loop: groups Mailing-List: list rack-devel@googlegroups.com; contact rack-devel+owner@googlegroups.com List-Id: List-Post: List-Help: List-Unsubscribe: , X-BeenThere-Env: rack-devel@googlegroups.com X-BeenThere: rack-devel@googlegroups.com Try putting the ContentLength-middleware above Lint. 2009/6/29, Joe Fiorini : > > I'm at the starting phase of building a web app using Rack. I'm trying > to add in some useful middleware on top of the Lobster demo. I want to > ensure my app always matches the spec, so I'm using Rack::Lint. > However, this immediately bombs out telling me the Content-Length is > nil. My config.ru looks like this: > > require 'rack' > require 'rack/lobster' > > use Rack::ShowExceptions > use Rack::CommonLogger > use Rack::ShowStatus > use Rack::Lint > use Rack::ContentLength > run Rack::Lobster.new > > > But even if I take it down to this: > > require 'rack' > require 'rack/lobster' > > use Rack::Lint > use Rack::ContentLength > run Rack::Lobster.new > > it still breaks! I'm running the app on Passenger. It does work, > however, if I run straight through the rackup executable. Perhaps > Passenger is mangling my env hash? If I take out Rack::Lint and run it > (via Passenger), the headers do show a valid Content-Length. Weird, > eh? > > Perplexed, > Joe > -- //Magnus Holm