Re: [Cppcms-users] Some remarks
Brought to you by:
artyom-beilis
From: Stanimir M. <sta...@zo...> - 2009-11-24 09:34:47
|
Hello, Thanks for the guide, it helped a lot! Reading more deeply the documentation of lighttpd answered my question too, but after your help it was much easier. Greetings, Stanimir On Sat, Nov 21, 2009 at 6:29 PM, Artyom <art...@ya...> wrote: >> I must add that the problem is not in the configuration but >> in the >> regex in the url.add method. >> If the regex is url.add("(.*)", >> boost::bind<void>(&myapp::index,this,_1)); >> it works. However, when I try to display the binded >> argument it is an >> empty string. > > The basic rule. When server matches url it splits it into > "SCRIPT_NAME" and "PATH_INFO" > > Under lighttpd: > > For script "/foo": > > /foo/bar => "/foo" and "/bar" > /foo/ => "/foo" and "/" > /foo => "/foo" and "" > > For script "my_app.fcgi" it would be > > /some/path/my_app.fcgi/bar => "/some/path/my_app.fcgi" and "/bar" > /my_app.fcgi => "/my_app.fcgi" and "" > > As far as I know for script "/" it does wired things... do not > use it directly. Rather rewrite the URL to something like > /bar => /foo/bar > And use script "/foo" > > url.add ALWAYS matches against PATH_INFO. > > So in order to make url parsing work, make sure you get from the > server the correct path info. > > For simplest debugging: > > url.add("^(.*)$",boost::bind(&myapp::index,this,_1)); > > Make sure you make the server sending correct PATH_INFO > variable. > > Best, > Artyom > > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |