From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.86.23.1 with SMTP id 1cs163213fgw; Sat, 29 Aug 2009 02:30:44 -0700 (PDT) Received-SPF: pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.91.176.16 as permitted sender) client-ip=10.91.176.16; Authentication-Results: mr.google.com; spf=pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.91.176.16 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.91.176.16]) by 10.91.176.16 with SMTP id d16mr873641agp.20.1251538243954 (num_hops = 1); Sat, 29 Aug 2009 02:30:43 -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:content-type :content-transfer-encoding:received:in-reply-to:references:date :message-id:subject:from:to:x-google-approved:reply-to:sender :precedence:x-google-loop:mailing-list:list-id:list-post:list-help :list-unsubscribe:x-beenthere-env:x-beenthere; bh=kpsXUBXkBmx42S47WsBysLIaEAfhM4Z4hGB7KrmM460=; b=sEY6u/beDCkBZZ2urx51kCG2PmjWkX8RIuonkUqgAHvtV6RbfGqb3Tyqazb7Sg75rT 2F047Ehj6aDRdQa5Exqe6PDVtBbqHZXpQwjQt3sBG7OMpmRltOvlJegmYF4VSV3KHtU9 Ovy4d5Tam7daWXpbBPZXHcvt7BFe1PZcCXvyY= 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:content-type :content-transfer-encoding:in-reply-to:references:date:message-id :subject:from:to:x-google-approved:reply-to:sender:precedence :x-google-loop:mailing-list:list-id:list-post:list-help :list-unsubscribe:x-beenthere-env:x-beenthere; b=WTVmbOZ8xD/ugYelM+5+1HyMg0F9T6vna7oQT/ounsXZIomAsnX+kxBLMyhnzBv9vT rTgOVAv9MNR/2wJvHlAikTIRyjHPwX7WjxpE5rkyAMnyjlnGkN3U7sGQRF9WnWzHiC5X zd9dxeP0nw/ZDAm1+JfRUy2mgypzOsMyeJ4Dw= Received: by 10.91.176.16 with SMTP id d16mr152374agp.20.1251538243859; Sat, 29 Aug 2009 02:30:43 -0700 (PDT) Received: by 10.176.54.11 with SMTP id c11gr1618yqa.0; Sat, 29 Aug 2009 02:30:28 -0700 (PDT) X-Sender: boesemar@googlemail.com X-Apparently-To: rack-devel@googlegroups.com Received: by 10.210.20.19 with SMTP id 19mr205979ebt.14.1251533866208; Sat, 29 Aug 2009 01:17:46 -0700 (PDT) Received: by 10.210.20.19 with SMTP id 19mr205978ebt.14.1251533866185; Sat, 29 Aug 2009 01:17:46 -0700 (PDT) Return-Path: Received: from mail-ew0-f213.google.com (mail-ew0-f213.google.com [209.85.219.213]) by gmr-mx.google.com with ESMTP id 13si469981ewy.2.2009.08.29.01.17.45; Sat, 29 Aug 2009 01:17:45 -0700 (PDT) Received-SPF: pass (google.com: domain of boesemar@googlemail.com designates 209.85.219.213 as permitted sender) client-ip=209.85.219.213; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of boesemar@googlemail.com designates 209.85.219.213 as permitted sender) smtp.mail=boesemar@googlemail.com; dkim=pass (test mode) header.i=@googlemail.com Received: by ewy9 with SMTP id 9so2318158ewy.25 for ; Sat, 29 Aug 2009 01:17:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=tXNsVKbBoqBhbDCDtMfHI2qRYOf+RDOmuBfR3UoSbUU=; b=HfeJ6G0HSWUDxvcSZkIGZOo/pPT2azyrtN1fTgUOL3zpbMypZDFoXzZTjIFiN0iFq4 BNeHTX8o8GNAcgNQQq6gFDlfyOzbYeJbCXkGznIKNLUl8zyMTAMAuX0Y73iCXzluE5UT YcZ4C8SR9ApbQ2dDrf0BIzUk9p/8uU3uo5Y9Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=HBJog8gO6e+Proj10znKZAQP1s0TgJ8TDMAor742SOVHq/h1TNsKygyDVr4olYO0eU si016W79dBB4O2i2svNu0IhlyhGQYrKy5JCFxAeD2qbzEpmD3I701LPKMgC5m78y0kcb bgwgrQUtkWosbVmXC6kWH9IbgiWCmQPVQjExw= Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Received: by 10.211.144.7 with SMTP id w7mr2385044ebn.28.1251533865088; Sat, 29 Aug 2009 01:17:45 -0700 (PDT) In-Reply-To: <391a49da0908281522k3797de17k3bd7e79f963510a7@mail.gmail.com> References: <3e2b1eee-ce69-440c-914a-db96ca1d7225@m38g2000yqh.googlegroups.com> <391a49da0908281522k3797de17k3bd7e79f963510a7@mail.gmail.com> Date: Sat, 29 Aug 2009 09:17:45 +0100 Message-ID: <27eae4af0908290117l221e57c9lf8ca5347c9c83094@mail.gmail.com> Subject: Re: Lighttpd's FastCGI Environment From: Martin Boese To: rack-devel@googlegroups.com X-Google-Approved: m.fellinger@gmail.com via web at 2009-08-29 09:30:27 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 On Fri, Aug 28, 2009 at 11:22 PM, Magnus Holm 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 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 >> >> =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.include?('?') >> =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 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 > >