From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.49.96.6 with SMTP id do6csp106804qeb; Sun, 4 Nov 2012 03:02:11 -0800 (PST) Return-Path: Received-SPF: pass (google.com: domain of rack-devel+bncBCPPBDHB7QGRBMMW3GCAKGQE2ZJKIAQ@googlegroups.com designates 10.50.242.106 as permitted sender) client-ip=10.50.242.106 Authentication-Results: mr.google.com; spf=pass (google.com: domain of rack-devel+bncBCPPBDHB7QGRBMMW3GCAKGQE2ZJKIAQ@googlegroups.com designates 10.50.242.106 as permitted sender) smtp.mail=rack-devel+bncBCPPBDHB7QGRBMMW3GCAKGQE2ZJKIAQ@googlegroups.com; dkim=pass header.i=rack-devel+bncBCPPBDHB7QGRBMMW3GCAKGQE2ZJKIAQ@googlegroups.com Received: from mr.google.com ([10.50.242.106]) by 10.50.242.106 with SMTP id wp10mr9728382igc.0.1352026930547 (num_hops = 1); Sun, 04 Nov 2012 03:02:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=x-beenthere:date:from:to:message-id:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; bh=5vmlP2UA+cxQ8XINviaLcIPozxdrTPT8C3iH3mfRptY=; b=s8la0BdHBOwdOf2FcPnAbvHlEk+PmTz/WK8NuCx2fhM7gDOhbbGbBZx7vMwjMwXvhr TqiFLJu7Y/56S4cI2zamg57ELBY92Uc1tXhUQUuUq08M2mwUAGs9wXfTADlysEZ5yFGO 6Nj3Sc+4CvYqg3YGQxINwX6dUfHzlYStD3DcEBMpBUmDT/IayFn/oR57dx4GaX0gNbfW Eq+Vs1O1zD88mZG4lRvebSwnUuJcWq2oKgmemG19WLopNkOCLsp9bbwi7ZnXN/UfOXcC QtW3SbYhJJPwzFbbzPY92PB2YdNXZFlrU28xT2jYBDTw/hXss+4sbkC0pU7xr31dAtxV rJCQ== Received: by 10.50.242.106 with SMTP id wp10mr3020027igc.0.1352026930175; Sun, 04 Nov 2012 03:02:10 -0800 (PST) X-BeenThere: rack-devel@googlegroups.com Received: by 10.43.70.79 with SMTP id yf15ls6843169icb.6.gmail; Sun, 04 Nov 2012 03:02:09 -0800 (PST) Received: by 10.50.72.193 with SMTP id f1mr4632929igv.0.1352026929532; Sun, 04 Nov 2012 03:02:09 -0800 (PST) Received: by 10.50.57.13 with SMTP id e13msigq; Sat, 3 Nov 2012 22:14:10 -0700 (PDT) Received: by 10.68.248.102 with SMTP id yl6mr1543610pbc.12.1352006050219; Sat, 03 Nov 2012 22:14:10 -0700 (PDT) Date: Sat, 3 Nov 2012 22:14:09 -0700 (PDT) From: Oscar Del Ben To: rack-devel@googlegroups.com Message-Id: <51e063f8-e986-464b-9d5b-def5f1d908aa@googlegroups.com> Subject: Should server.run block? MIME-Version: 1.0 X-Original-Sender: oscar@oscardelben.com Reply-To: rack-devel@googlegroups.com Precedence: list Mailing-list: list rack-devel@googlegroups.com; contact rack-devel+owners@googlegroups.com List-ID: X-Google-Group-Id: 486215384060 List-Post: , List-Help: , List-Archive: Sender: rack-devel@googlegroups.com List-Subscribe: , List-Unsubscribe: , Content-Type: multipart/alternative; boundary="----=_Part_783_1952361.1352006049546" ------=_Part_783_1952361.1352006049546 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hello, I'm trying to build a rack handler and I've noticed that if I don't block from server.run then Rack::Builder fails. In my config.ru file I do the following: *Rack::Handler::Hare.run MyApp.new* but then Rack::Builder fails to parse the file when calling the to_app method: def to_app app = @map ? generate_map(@run, @map) : @run fail "missing run or map statement" unless app @use.reverse.inject(app) { |a,e| e[a] } end The problem here is that I never call *run* explicitly from config.ru, since I want to use my custom handler, which doesn't block. I've looked into the thin source code and server.run actually blocks, so that Rack::Builder#to_app is never called. Is this how the server is supposed to behave or am I missing something? Many thanks, Oscar Del Ben ------=_Part_783_1952361.1352006049546 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello,

I'm trying to build a rack handler and I've notic= ed that if I don't block from server.run then Rack::Builder fails= . In my config.ru file I do the following:

Rack= ::Handler::Hare.run MyApp.new

but then&nbs= p;Rack::Builder fails to parse the file when calling the to_app method= :

def to_app<= /div>
app = =3D @map ? generate_map(@r= un, @map) : @run
 &n= bsp;fail "missing run or map stat= ement" unless= app
  @usereverse.inject(app) { |a,e| e[a] }
end

The problem here is that I never call r= un explicitly from config.ru, since I want to use my custom handle= r, which doesn't block.

I've looked into the thin source code and server.run act= ually blocks, so that Rack::Builder#to_app is never called. Is this how the= server is supposed to behave or am I missing something?
<= /div>

<= /div>
Many thanks,=

=
Oscar Del B= en
------=_Part_783_1952361.1352006049546--