Re: [Cppcms-users] The role of cookie path
Brought to you by:
artyom-beilis
|
From: Artyom B. <art...@gm...> - 2016-07-09 18:23:30
|
Session values are not stored in various cookies but rather in the
single session cookie defined by prefix.
Note: you can expose values from server side to client using
session().expose feature and the value will be transferred
to the client but the session would never use it as it isn't secure
only the data stored withing CppCMS session/and its cookie
will be used regardless the other cookies defined.
session().is_set(...) looks into the session not the various cookies.
Artyom
On Sat, Jul 9, 2016 at 7:34 PM, CN <cn...@fa...> wrote:
> On Sat, Jul 9, 2016, at 08:02 PM, Artyom Beilis wrote:
>> Browser does not send path information about cookies it sends to
>> server in HTTP headers, actually it only sends cookie name and value -
>> not domain, expiration, path or other parameters. Only server does.
>> That is why you don't get this information in request().cookies() -
>> server just does not have one.
>
> Thank for answering my first question!
>
> After client gets the page from "http://localhost/normal", it calls this
> javascript:
>
> window.location.replace("http://localhost/special");
>
> Upon receiving the request, server shows that request().cookies() holds
> item "prefix_my_cookie". On the other hand,
> session().is_set("my_cookie") returns false.
>
> Why server denies the existence of cookie "my_cookie"?
>
> Best Regards,
> CN
>
> --
> http://www.fastmail.com - mmm... Fastmail...
>
>
> ------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
> _______________________________________________
> Cppcms-users mailing list
> Cpp...@li...
> https://lists.sourceforge.net/lists/listinfo/cppcms-users
|