Re: [Cppcms-users] Session data from client does not reach cppcms::rpc::json_rpc_server method?
Brought to you by:
artyom-beilis
|
From: CN <cn...@fa...> - 2013-11-29 12:15:25
|
Aha! I already had read [1]http://cppcms.com/wikipp/en/page/cppcms_1x_sessions before 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 [2]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 <[3]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 -- [4]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! [5]http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg .clktrk _______________________________________________ Cppcms-users mailing list [6]Cpp...@li... [7]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! [8]http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg .clktrk _______________________________________________ Cppcms-users mailing list [9]Cpp...@li... [10]https://lists.sourceforge.net/lists/listinfo/cppcms-users References 1. http://cppcms.com/wikipp/en/page/cppcms_1x_sessions 2. http://cppcms.com/wikipp/en/page/cppcms_1x_sessions 3. mailto:cn...@fa... 4. http://www.fastmail.fm/ 5. http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk 6. mailto:Cpp...@li... 7. https://lists.sourceforge.net/lists/listinfo/cppcms-users 8. http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk 9. mailto:Cpp...@li... 10. https://lists.sourceforge.net/lists/listinfo/cppcms-users -- http://www.fastmail.fm - A no graphics, no pop-ups email service |