From: Magnus Holm <judofyr@gmail.com>
To: rack-devel@googlegroups.com
Subject: Re: Lighttpd's FastCGI Environment
Date: Sat, 29 Aug 2009 19:59:02 +0200 [thread overview]
Message-ID: <391a49da0908291059y46f24113s8eff72515608e13a@mail.gmail.com> (raw)
In-Reply-To: <245fb4700908290706t61303c90x7ee12ca2d7b2b33d@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2327 bytes --]
Which rack lighty adapter?
//Magnus Holm
On Sat, Aug 29, 2009 at 16:06, Yehuda Katz <wycats@gmail.com> 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 <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:
>> 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 <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 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
>
[-- Attachment #2: Type: text/html, Size: 3799 bytes --]
next prev parent reply other threads:[~2009-08-29 17:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-28 14:37 Lighttpd's FastCGI Environment bones
2009-08-28 20:43 ` Yehuda Katz
2009-08-28 22:22 ` Magnus Holm
2009-08-29 8:17 ` Martin Boese
2009-08-29 14:06 ` Yehuda Katz
2009-08-29 17:59 ` Magnus Holm [this message]
2009-08-30 8:45 ` Martin Boese
2009-08-30 18:27 ` Magnus Holm
2009-08-30 18:51 ` Yehuda Katz
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=391a49da0908291059y46f24113s8eff72515608e13a@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).