From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.86.23.1 with SMTP id 1cs172315fgw; Sat, 29 Aug 2009 07:09:47 -0700 (PDT) Received-SPF: pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.220.108.216 as permitted sender) client-ip=10.220.108.216; Authentication-Results: mr.google.com; spf=pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.220.108.216 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.220.108.216]) by 10.220.108.216 with SMTP id g24mr2291918vcp.1.1251554985683 (num_hops = 1); Sat, 29 Aug 2009 07:09:45 -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:received-spf:received:dkim-signature :domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type:reply-to:sender :precedence:x-google-loop:mailing-list:list-id:list-post:list-help :list-unsubscribe:x-beenthere-env:x-beenthere; bh=LBfJJmcyQU+iyHYXnSDhzlX4P+bPtYdr0yEPX6NXRzU=; b=pFfHRyzXvPlQGpnGXIXRMDDRSOjsKp4YmTtTxfStesT0SZ1cz/Ppa2ECrrqoXYiNXk yBXIeUR9z8JGMoJ7Tb4Nop4NitKpjyQ11zBuNjXXjfZU6EjGUJ5f5aRKxFY8hQ7DqP2n HpBGhihjzm4ejDV2j+pwEutNu8uWzYeWhqJ0c= 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:from:date:message-id:subject:to:content-type:reply-to :sender:precedence:x-google-loop:mailing-list:list-id:list-post :list-help:list-unsubscribe:x-beenthere-env:x-beenthere; b=h1PQPrFhphwYg1Kh/iPJQLeUTokw2szfxkAsqlCtkTGYM2+Aso97M7NrY7Tlf4IPeP oZCuzJtHySbrJU0RYPzDGuBKRAv7vlDkrV4ytQwkhmqBGaRsXjm2TfqCua9qOQbAfRaA qhU8PEoDCP1NLlawJ8HXkQtIu3J6SVrZLiwc4= Received: by 10.220.108.216 with SMTP id g24mr361373vcp.1.1251554982415; Sat, 29 Aug 2009 07:09:42 -0700 (PDT) Received: by 10.230.39.80 with SMTP id f16gr1619vbe.0; Sat, 29 Aug 2009 07:09:27 -0700 (PDT) X-Sender: wycats@gmail.com X-Apparently-To: rack-devel@googlegroups.com Received: by 10.220.83.24 with SMTP id d24mr784949vcl.29.1251554899658; Sat, 29 Aug 2009 07:08:19 -0700 (PDT) Received: by 10.220.83.24 with SMTP id d24mr784730vcl.29.1251554833372; Sat, 29 Aug 2009 07:07:13 -0700 (PDT) Return-Path: Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by gmr-mx.google.com with ESMTP id 18si185018vws.13.2009.08.29.07.07.12; Sat, 29 Aug 2009 07:07:12 -0700 (PDT) Received-SPF: pass (google.com: domain of wycats@gmail.com designates 74.125.92.26 as permitted sender) client-ip=74.125.92.26; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of wycats@gmail.com designates 74.125.92.26 as permitted sender) smtp.mail=wycats@gmail.com; dkim=pass (test mode) header.i=@gmail.com Received: by qw-out-2122.google.com with SMTP id 5so698300qwi.47 for ; Sat, 29 Aug 2009 07:07:12 -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 :from:date:message-id:subject:to:content-type; bh=kMKvXR6X2J7Wb8ls8PkZ1K5fMbGz5GRXUGqymN3Cr+8=; b=r25vl6KNR3o+VHdY1OWccleTnaRnuSPZ8HVZe3BJrH30V5r10CYWTfZRyWXo+UjC0c M/0RrA1tKS+Zfqye3yb5GZCc+Ao3mO81W8mtXqPYfobls/2/+YjNbX2XOwqeU3BgNEm/ jPBTjilYvc/Si4w98CjJFHwf3f2AHn2CmMrXk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=iTNVRyqc3AygQF/PhrGIdutxlRzBCrqQtZqYR36uQZz2jXSCb9qr5sOfgyC5sPE0cc h7/BtwGaG9a9Ty4jLQ6SbooBxrk11N86gsEsIaLSF575NOr955yvnXXkt9ZfeVcJEftT D7lkIBYE7wDGsBqPtzfCMkIFZjFZkpBzW2wxI= MIME-Version: 1.0 Received: by 10.224.118.72 with SMTP id u8mr2086973qaq.25.1251554832112; Sat, 29 Aug 2009 07:07:12 -0700 (PDT) In-Reply-To: <27eae4af0908290117l221e57c9lf8ca5347c9c83094@mail.gmail.com> References: <3e2b1eee-ce69-440c-914a-db96ca1d7225@m38g2000yqh.googlegroups.com> <391a49da0908281522k3797de17k3bd7e79f963510a7@mail.gmail.com> <27eae4af0908290117l221e57c9lf8ca5347c9c83094@mail.gmail.com> From: Yehuda Katz Date: Sat, 29 Aug 2009 09:06:52 -0500 Message-ID: <245fb4700908290706t61303c90x7ee12ca2d7b2b33d@mail.gmail.com> Subject: Re: Lighttpd's FastCGI Environment To: rack-devel@googlegroups.com Content-Type: multipart/alternative; boundary=000feae8d0ec2f5ecc0472485129 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 --000feae8d0ec2f5ecc0472485129 Content-Type: text/plain; charset=ISO-8859-1 That is definitely the intention. This should be fixed in the rack lighty adapter. -- Yehuda On Sat, Aug 29, 2009 at 3:17 AM, Martin Boese wrote: > > On Fri, Aug 28, 2009 at 11:22 PM, Magnus Holm wrote: > > > > There is another know issue with Lighttpd: > http://github.com/rack/rack/blob/master/KNOWN-ISSUES > > > > Maybe they're related? > > > > //Magnus Holm > > Thanks, yes that sounds related. > > I was hoping that Rack will give me a standard set of environments no > matter in which technologie the applicaion is deployed at the end. > But I guess that should be fixed in Lighttpd's cgi implementation > instead... > > Martin > > > > > > > > On Fri, Aug 28, 2009 at 16:37, bones wrote: > >> > >> > >> I am porting my application from ruby fcgi to rack which is in > >> production using the Lighttpd webserver. > >> > >> I noticed that lighttpd doesn't send PATH_INFO or QUERY_STRING so I > >> used to patch it by reconstructing it from REQUEST_URI. Now with Rack > >> I have exactly the same situation. Rack::Request.GET is empty. This > >> fix on the environment makes it working: > >> > >> class RackApp > >> > >> def fix_env(ec) > >> if (ec['PATH_INFO'].to_s.empty?) then > >> pi = ec['REQUEST_URI'] > >> pi = pi[0..(pi.index('?')-1)] if pi.include?('?') > >> ec['PATH_INFO'] = pi > >> end > >> > >> if (ec['QUERY_STRING'].to_s.empty?) then > >> ec['QUERY_STRING'] = ec['REQUEST_URI'].include?('?') ? > >> ec['REQUEST_URI'].scan(/.?\?(.*)/)[0][0] : > >> "" > >> end > >> ec > >> end > >> > >> def call(env) > >> Rack::Request.new(fix_env(env)) > >> # [...] > >> end > >> end > >> > >> > >> As far as I know Lighttpd and Rails (which used Rack?!) is a popular > >> combination - so I am quiet surprised that I don't find anything > >> related on the web. Especially - shouldn't that be implemented into > >> Rack's CGI/FastCGI Handler? > >> > >> Cheers, > >> Martin > > > > > -- Yehuda Katz Developer | Engine Yard (ph) 718.877.1325 --000feae8d0ec2f5ecc0472485129 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable That is definitely the intention. This should be fixed in the rack lighty a= dapter.

-- Yehuda

On S= at, Aug 29, 2009 at 3:17 AM, Martin Boese <boesemar@googlemail.com> wrot= e:

On Fri, Aug 28, 2009 at 11:22 PM, Magnus Holm <judofyr@gmail.com> wrote:
>
> There is another know issue with Lighttpd:=A0http://github.com= /rack/rack/blob/master/KNOWN-ISSUES
>
> Maybe they're related?
>
> //Magnus Holm

Thanks, yes that sounds related.

I was hoping that Rack will give me a standard set of environments no
matter in which technologie the applicaion is deployed at the end.
But I guess that should be fixed in Lighttpd's cgi implementation inste= ad...

Martin


>
>
> On Fri, Aug 28, 2009 at 16:37, bones <boesemar@googlemail.com> wrote:
>>
>>
>> I am porting my application from ruby fcgi to rack which is in
>> production using the Lighttpd webserver.
>>
>> I noticed that lighttpd doesn't send PATH_INFO or QUERY_STRING= so I
>> used to patch it by reconstructing it from REQUEST_URI. Now with R= ack
>> I have exactly the same situation. Rack::Request.GET is empty. Thi= s
>> fix on the environment makes it working:
>>
>> class RackApp
>>
>> =A0def fix_env(ec)
>> =A0 =A0 =A0 if (ec['PATH_INFO'].to_s.empty?) then
>> =A0 =A0 =A0 =A0 =A0pi =3D =A0ec['REQUEST_URI']
>> =A0 =A0 =A0 =A0 =A0pi =3D pi[0..(pi.index('?')-1)] if pi.i= nclude?('?')
>> =A0 =A0 =A0 =A0 =A0ec['PATH_INFO'] =3D pi
>> =A0 =A0 =A0 end
>>
>> =A0 =A0 =A0 if (ec['QUERY_STRING'].to_s.empty?) then
>> =A0 =A0 =A0 =A0 =A0ec['QUERY_STRING'] =3D ec['REQUEST_= URI'].include?('?') ?
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0ec['REQUEST_URI'].scan(/.?\?(.*= )/)[0][0] :
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0""
>> =A0 =A0 =A0 end
>> =A0 =A0 =A0 ec
>> =A0end
>>
>> =A0def call(env)
>> =A0 =A0Rack::Request.new(fix_env(env))
>> =A0 # [...]
>> =A0end
>> end
>>
>>
>> As far as I know Lighttpd and Rails (which used Rack?!) is a popul= ar
>> combination - so I am quiet surprised that I don't find anythi= ng
>> related on the web. Especially - shouldn't that be implemented= into
>> Rack's CGI/FastCGI Handler?
>>
>> Cheers,
>> Martin
>
>



--
Yehuda Katz=
Developer | Engine Yard
(ph) 718.877.1325
--000feae8d0ec2f5ecc0472485129--