Re: [Cppcms-users] Mounting both synchronous and asynchronous applications
Brought to you by:
artyom-beilis
From: CN <cn...@gr...> - 2011-02-01 15:47:06
|
My brain starts to malfunction due to late hour here. Sorry for the previous incorrect code. Please use this one instead. The unexpected results mentioned in last post remain unresolved. //code begin class sync_app:public cppcms::application{ .... } class async_app:public cppcms::application { async_app(cppcms::service &srv) : cppcms::application(srv) { dispatcher().assign("(.*)",&async_app::catch_all,this,1); } void catch_all(std::string url) { BOOSTER_LOG(debug,"URL") << url; } } int main(int argc,char **argv) { cppcms::service s(argc,argv); s.applications_pool().mount(cppcms::applications_factory<sync_app>(),cppcms::mount_point("/s/a")); booster::intrusive_ptr<async_app> as_app=new async_app(s); //typo error //Watch the match string in the next line! s.applications_pool().mount(as_app,cppcms::mount_point("/as/a")); s.run(); } //code end Browser accesses to URL "/as/a". The match strings and logs follows: match string log --------------- /as (none) .* /as/a as (none) a (none) /a (none) /as/a (none) That being said, only provided with script ".*" will mount_point() fire application "async_app": s.applications_pool().mount(as_app,cppcms::mount_point(".*")); Regards, CN |