reverted last commit (secure flag to cookie) with some info

git-svn-id: svn://ttmath.org/publicrep/winix/trunk@822 e52654a7-88a9-db11-a3e9-0013d4bc506e
pull/3/head
Tomasz Sowa 11 years ago
parent 71ae70f670
commit 70421b7bd1

@ -114,12 +114,15 @@ void Request::SetCookie(const char * name, const char * value, tm * expires)
if( expires )
headers << "; expires=" << DateToStrCookie(expires) << " GMT";
headers << "; path=/; domain=" << config->base_url;
headers << "; path=/; domain=" << config->base_url << "\r\n";
if( using_ssl )
headers << "; secure";
headers << "\r\n";
/*
don't use '; secure' flag if you are using both sites (with SSL
and without SSL) -- with secure flag the cookie is sent only through
SSL and if you accidentally open a new window without SSL (http://)
then winix will create a new session for you and the previous session (https://)
will be lost (cookie is overwritten on the client browser)
*/
}
@ -131,12 +134,7 @@ void Request::SetCookie(const char * name, long value, tm * expires)
if( expires )
headers << "; expires=" << DateToStrCookie(expires) << " GMT";
headers << "; path=/; domain=" << config->base_url;
if( using_ssl )
headers << "; secure";
headers << "\r\n";
headers << "; path=/; domain=" << config->base_url << "\r\n";
}

Loading…
Cancel
Save