Mailinglist Archive: yast-devel (233 mails)

< Previous Next >
[yast-devel] Re: [yast-commit] <web-client> master : - Fixed static overlay when running in lighttpd server (bnc#544355)
  • From: Ladislav Slezak <lslezak@xxxxxxx>
  • Date: Thu, 08 Oct 2009 11:12:36 +0200
  • Message-id: <4ACDAD04.4070803@xxxxxxx>
On 7.10.2009 20:14, Ladislav Slezak wrote:
ref: refs/heads/master
commit 23f769a1d9bd45762bf2eddbea731d1a64542dee
Author: Ladislav Slezak <lslezak@xxxxxxxxxx>
Date: Wed Oct 7 20:14:36 2009 +0200
[...]
diff --git a/webclient/lib/yast/rack/static_overlay.rb
b/webclient/lib/yast/rack/static_overlay.rb
index 807470d..0548cf7 100644
--- a/webclient/lib/yast/rack/static_overlay.rb
+++ b/webclient/lib/yast/rack/static_overlay.rb
@@ -25,11 +25,21 @@ module YaST
def call(env)
req = ::Rack::Request.new(env)
resource = URI.parse(req.url).path
- puts resource
+
+ # this is a workaround for lighttpd server
+ # where all requests go through FastCGI dispatcher
+ if resource == '/dispatch.fcgi'
+ # get the real request path
+ resource = env['REQUEST_URI']
+ # Rack expects the path in PATH_INFO which is not set by lighttpd
+ env['PATH_INFO'] = env['REQUEST_URI']
+ end
+

I'm not sure if this is the correct fix, I have found that the environment
('env'
variable in the code above) is quite different when running in lighttpd
server (in contrast to Mongrel or Webrick).

Maybe the lighttpd config should be changed instead of this patch, I don't know.
Can somebody check this possibility? Schubi? Duncan?



--

Best Regards

Ladislav Slez√°k
Yast Developer
------------------------------------------------------------------------
SUSE LINUX, s.r.o. e-mail: lslezak@xxxxxxx
Lihovarsk√° 1060/12 tel: +420 284 028 960
190 00 Prague 9 fax: +420 284 028 951
Czech Republic http://www.suse.cz/
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages