Re: [Cppcms-users] Session data from client does not reach cppcms::rpc::json_rpc_server method?
Brought to you by:
artyom-beilis
|
From: Shiv S. D. <shi...@gm...> - 2013-11-29 13:00:27
|
But to set a client-side cookie you set it from server side. That is server stores session data in client in the form of cookie. Another thing which can happen is you use client side cookies using something like jQuery Cookie but that is a different question. I see in the sessions example that when form data is received it sets name, sex, state and age. I have not yet studied how things work in asynchronous applications. My knowledge is limited in this regard so I would rather wait for some expert to comment. On Fri, Nov 29, 2013 at 5:45 PM, CN <cn...@fa...> wrote: > Aha! > > I already had read http://cppcms.com/wikipp/en/page/cppcms_1x_sessionsbefore I posted my question. After re-reading it, I finally notice that > > cppcms::session_interface::load() > > must be called every time after the request arrives in asynchronous > applications. > > session().set("my_key") is automatically called by the framework if client > side cookie named "my_key" is set. This means we do not need to manually > call session().set("my_key") if that cookie is already set. Please correct > me if I misunderstand it! > > Regards, > CN > > On Fri, Nov 29, 2013, at 07:48 PM, Shiv Shankar Dayal wrote: > > If you want to retrieve session().is_set("my_key") which appears to be > your key > then before retrieving you need to set it as shown in > http://cppcms.com/wikipp/en/page/cppcms_1x_sessions > For example, > > session().set("my_key", true); > > before it will return true. > > > On Fri, Nov 29, 2013 at 4:59 PM, CN <cn...@fa...> wrote: > > Taking void post(std::string const &author,std::string const &message) > in file json_rpc_chat.cpp as an example, > > session().is_set("my_key"); > > appears to always return false. However, > > session().get_session_cookie(); > > does return a string. Am I misunderstanding http or the framework? > > Thank you! > CN > > -- http://www.fastmail.fm - Choose from over 50 domains or use your own > > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics > Pro! > > http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > -- > Respect, > Shiv Shankar Dayal > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics > Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk > *_______________________________________________* > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > -- http://www.fastmail.fm - A no graphics, no pop-ups email service > > > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics > Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > -- Respect, Shiv Shankar Dayal |