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