From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.142.191.1 with SMTP id o1cs15276wff; Sat, 5 Dec 2009 09:10:15 -0800 (PST) Received: from mr.google.com ([10.91.164.38]) by 10.91.164.38 with SMTP id r38mr5396662ago.5.1260033014483 (num_hops = 1); Sat, 05 Dec 2009 09:10:14 -0800 (PST) Received: by 10.91.164.38 with SMTP id r38mr632700ago.5.1260033012951; Sat, 05 Dec 2009 09:10:12 -0800 (PST) X-BeenThere: rack-devel@googlegroups.com Received: by 10.86.239.10 with SMTP id m10ls53755fgh.0.p; Sat, 05 Dec 2009 09:10:11 -0800 (PST) Received: by 10.86.176.2 with SMTP id y2mr55374fge.13.1260033010918; Sat, 05 Dec 2009 09:10:10 -0800 (PST) Received: by 10.204.130.85 with SMTP id r21mr114478bks.28.1260032705538; Sat, 05 Dec 2009 09:05:05 -0800 (PST) Received: by 10.204.130.85 with SMTP id r21mr114477bks.28.1260032705519; Sat, 05 Dec 2009 09:05:05 -0800 (PST) Return-Path: Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.159]) by gmr-mx.google.com with ESMTP id 17si214841bwz.0.2009.12.05.09.05.04; Sat, 05 Dec 2009 09:05:04 -0800 (PST) Received-SPF: pass (google.com: domain of kevwil@gmail.com designates 72.14.220.159 as permitted sender) client-ip=72.14.220.159; Received: by fg-out-1718.google.com with SMTP id 19so240119fgg.13 for ; Sat, 05 Dec 2009 09:05:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.239.199.199 with SMTP id i7mr485017hbj.204.1260032703891; Sat, 05 Dec 2009 09:05:03 -0800 (PST) In-Reply-To: <683a886f0912050800q54aeb159hb8b32c54c4d21d91@mail.gmail.com> References: <683a886f0912041804p29185909j9abcb55c555e0f89@mail.gmail.com> <9c00d3e00912042243k673476doe228f2145d35f32e@mail.gmail.com> <683a886f0912050800q54aeb159hb8b32c54c4d21d91@mail.gmail.com> Date: Sat, 5 Dec 2009 10:05:03 -0700 Message-ID: <683a886f0912050905x7570a861wff33ca43a47b7b77@mail.gmail.com> Subject: Re: Rack-compatible server issues From: Kevin Williams To: rack-devel@googlegroups.com Reply-To: rack-devel@googlegroups.com Precedence: list Mailing-list: list rack-devel@googlegroups.com; contact rack-devel+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: X-Thread-Url: http://groups.google.com/group/rack-devel/t/26d7532ef68e0e27 X-Message-Url: http://groups.google.com/group/rack-devel/msg/ef7bee38308b21c1 List-Unsubscribe: , List-Subscribe: , Content-Type: text/plain; charset=UTF-8 replying to myself .... My server code hasn't been handling the body correctly. I re-wrote the body handling code to comply with the spec (respond to :each and yield only Strings). Once I did that, these Rack middlewares and Rack::Builder suddenly worked. On Sat, Dec 5, 2009 at 9:00 AM, Kevin Williams wrote: > Thanks for the clean example!!! > > What I get as output is: > > 200 > Content-Typetext/plain > # > > I expect to see 'OK' instead of the CommonLogger instance as the 3rd > element in the returned array. > > I seem to always have either that problem, or I get a Rack::Lint > returned as the only element returned. This is really problematic as I > expect a 'status' number as the first element. > > > On Fri, Dec 4, 2009 at 11:43 PM, Michael Fellinger > wrote: >> Structure it like this: >> >> http://pastr.it/16475 >> >> >> On Sat, Dec 5, 2009 at 11:04 AM, Kevin Williams wrote: >>> I'm implementing a Rack-compatible server for JRuby. I'm having issues >>> with complex apps returning bad data. Simple lambda apps run fine, but >>> when a Rack::Builder -created app is used, weird stuff happens. >>> >>> http://gist.github.com/249506 >>> >>> If I pass just the lambda, my server runs fine, but if I pass the >>> whole builder-created app (any combination of middleware), I get one >>> of the middleware classes returned from the #call(env) method. >>> >>> I thought once my server makes the top @app.call(env) call, it's all >>> Rack middleware and the user's app chained together. Shouldn't I get >>> the result of the user's app back to my server no matter what? What >>> could I be doing wrong that would cause this odd result? >>> >>> Kevin >>> >> >> >> >> -- >> Michael Fellinger >> CTO, The Rubyists, LLC >> 972-996-5199 >> >