rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: Kevin Williams <kevwil@gmail.com>
To: rack-devel@googlegroups.com
Subject: Re: Rack-compatible server issues
Date: Sat, 5 Dec 2009 10:05:03 -0700	[thread overview]
Message-ID: <683a886f0912050905x7570a861wff33ca43a47b7b77@mail.gmail.com> (raw)
In-Reply-To: <683a886f0912050800q54aeb159hb8b32c54c4d21d91@mail.gmail.com>

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 <kevwil@gmail.com> wrote:
> Thanks for the clean example!!!
>
> What I get as output is:
>
> 200
> Content-Typetext/plain
> #<Rack::CommonLogger:0x1235db0>
>
> 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
> <m.fellinger@gmail.com> wrote:
>> Structure it like this:
>>
>> http://pastr.it/16475
>>
>>
>> On Sat, Dec 5, 2009 at 11:04 AM, Kevin Williams <kevwil@gmail.com> 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
>>
>

      reply	other threads:[~2009-12-05 17:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-05  2:04 Rack-compatible server issues Kevin Williams
2009-12-05  6:42 ` Matt Todd
2009-12-05 15:51   ` Kevin Williams
2009-12-05 20:49     ` Iñaki Baz Castillo
2009-12-05 22:55       ` Scytrin dai Kinthra
2009-12-05  6:43 ` Michael Fellinger
2009-12-05 16:00   ` Kevin Williams
2009-12-05 17:05     ` Kevin Williams [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-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://groups.google.com/group/rack-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=683a886f0912050905x7570a861wff33ca43a47b7b77@mail.gmail.com \
    --to=rack-devel@googlegroups.com \
    /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.
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).