From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.86.23.1 with SMTP id 1cs179130fgw; Sat, 29 Aug 2009 10:59:26 -0700 (PDT) Received-SPF: pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.150.89.41 as permitted sender) client-ip=10.150.89.41; Authentication-Results: mr.google.com; spf=pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.150.89.41 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.150.89.41]) by 10.150.89.41 with SMTP id m41mr4151720ybb.14.1251568765720 (num_hops = 1); Sat, 29 Aug 2009 10:59:25 -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=/klO0au/J6zn6TZjWlaaPYLjDVRurtFG1kGNTxu1JOs=; b=rEL6zyZE79D5u+3AFrW1muiO5vMGOj36D92cY38dlX0uwpDhhXSGG/YW9AvjQIXfKU XH+BcbHQqYDCq3RL56kBr9EKXkMD2aJFYnpg0Y72Vc22zBhwCHnciF1YPgBgNr8RFxm/ kPgj31vtFmW6trZGqIHah0BcuO3MqC2agSZrI= 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=Y2GbLwoD5YHN6qeCs7HCCvJwClvwzAtbmD74p1EfBgzlvQEdi7mzhF1VuIuN6gLj6W FT2MJl3ZcwRhF/tLT+YtwSko0NFdTgkTdpPgjfka3/M4GwIL0YePXzTznS4jyJ7qz0OC fECKc3DtTOLuN9sPZw9CSX1n6LJwaDk3jISGU= Received: by 10.150.89.41 with SMTP id m41mr750563ybb.14.1251568765675; Sat, 29 Aug 2009 10:59:25 -0700 (PDT) Received: by 10.177.79.14 with SMTP id g14gr1620yql.0; Sat, 29 Aug 2009 10:59:24 -0700 (PDT) X-Sender: judofyr@gmail.com X-Apparently-To: rack-devel@googlegroups.com Received: by 10.204.34.4 with SMTP id j4mr126171bkd.10.1251568763328; Sat, 29 Aug 2009 10:59:23 -0700 (PDT) Received: by 10.204.34.4 with SMTP id j4mr126170bkd.10.1251568763301; Sat, 29 Aug 2009 10:59:23 -0700 (PDT) Return-Path: Received: from mail-fx0-f220.google.com (mail-fx0-f220.google.com [209.85.220.220]) by gmr-mx.google.com with ESMTP id 15si255593fxm.1.2009.08.29.10.59.22; Sat, 29 Aug 2009 10:59:22 -0700 (PDT) Received-SPF: pass (google.com: domain of judofyr@gmail.com designates 209.85.220.220 as permitted sender) client-ip=209.85.220.220; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of judofyr@gmail.com designates 209.85.220.220 as permitted sender) smtp.mail=judofyr@gmail.com; dkim=pass (test mode) header.i=@gmail.com Received: by mail-fx0-f220.google.com with SMTP id 20so2153110fxm.24 for ; Sat, 29 Aug 2009 10:59:22 -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=baO8kgKUS5+vDoolAkrCmptgklF8qeHvhKfFXsxGKMY=; b=ok48vPBURUPkyWHbpBsp+XALsgpkMTWl/Q0QLoRQ8s6ZQaz9BP4ZvOhBAAjWpIpk8H 0lNvqNowrDDn4zHrXmLRBNr3AfM+rGUkFqNkm2Rq5n58B20Pcjorj6Mxwj9YalQYHTcS dDpHF/Ynbtsxd3Qa1ndSFoFXp8KoLoLluiOgc= 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=K6N0oV9KczfRvS5Vj3PRUKnjW0ubvA2sigFWnmONr+c2mCtmRUvvhuWGx912mJDlML q9Xwl2yvTUfmBCL/KqNQrDfq1fsOcf6lRp4l1aomosP9rhwDdTxkBQ2DptlSW4NWb5Gr xNdUdXdqhJtob0N2G5ZTeM9WldcjyLKRxdB5Y= MIME-Version: 1.0 Received: by 10.103.126.34 with SMTP id d34mr1079643mun.22.1251568762113; Sat, 29 Aug 2009 10:59:22 -0700 (PDT) In-Reply-To: <245fb4700908290706t61303c90x7ee12ca2d7b2b33d@mail.gmail.com> References: <3e2b1eee-ce69-440c-914a-db96ca1d7225@m38g2000yqh.googlegroups.com> <391a49da0908281522k3797de17k3bd7e79f963510a7@mail.gmail.com> <27eae4af0908290117l221e57c9lf8ca5347c9c83094@mail.gmail.com> <245fb4700908290706t61303c90x7ee12ca2d7b2b33d@mail.gmail.com> From: Magnus Holm Date: Sat, 29 Aug 2009 19:59:02 +0200 Message-ID: <391a49da0908291059y46f24113s8eff72515608e13a@mail.gmail.com> Subject: Re: Lighttpd's FastCGI Environment To: rack-devel@googlegroups.com Content-Type: multipart/alternative; boundary=0016e659f68e7a4e4104724b8fc3 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 --0016e659f68e7a4e4104724b8fc3 Content-Type: text/plain; charset=UTF-8 Which rack lighty adapter? //Magnus Holm On Sat, Aug 29, 2009 at 16:06, Yehuda Katz wrote: > 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 > --0016e659f68e7a4e4104724b8fc3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Which rack lighty adapter?

//Magnus Holm


On Sat, Aug 29, 2009 at 16:06, Yehuda Ka= tz <wycats@gmail.c= om> wrote:
That is definitely the intention. This should be fixed in the rack lighty a= dapter.

-- Yehuda


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

On Fri, Aug 28, 2009 at 11:22 PM, Magnus Holm <judofyr@gmail.com> wrote:
>
> There is another know issue with Lighttpd:=C2=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
>>
>> =C2=A0def fix_env(ec)
>> =C2=A0 =C2=A0 =C2=A0 if (ec['PATH_INFO'].to_s.empty?) then=
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pi =3D =C2=A0ec['REQUEST_URI= ']
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pi =3D pi[0..(pi.index('?= 9;)-1)] if pi.include?('?')
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ec['PATH_INFO'] =3D pi >> =C2=A0 =C2=A0 =C2=A0 end
>>
>> =C2=A0 =C2=A0 =C2=A0 if (ec['QUERY_STRING'].to_s.empty?) t= hen
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ec['QUERY_STRING'] =3D e= c['REQUEST_URI'].include?('?') ?
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ec['REQUEST_UR= I'].scan(/.?\?(.*)/)[0][0] :
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0""
>> =C2=A0 =C2=A0 =C2=A0 end
>> =C2=A0 =C2=A0 =C2=A0 ec
>> =C2=A0end
>>
>> =C2=A0def call(env)
>> =C2=A0 =C2=A0Rack::Request.new(fix_env(env))
>> =C2=A0 # [...]
>> =C2=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.1= 325

--0016e659f68e7a4e4104724b8fc3--