added: to cookies: flag "; secure" if a connection is through SSL
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@821 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
b1b3cea64e
commit
71ae70f670
|
@ -114,7 +114,12 @@ void Request::SetCookie(const char * name, const char * value, tm * expires)
|
||||||
if( expires )
|
if( expires )
|
||||||
headers << "; expires=" << DateToStrCookie(expires) << " GMT";
|
headers << "; expires=" << DateToStrCookie(expires) << " GMT";
|
||||||
|
|
||||||
headers << "; path=/; domain=" << config->base_url << "\r\n";
|
headers << "; path=/; domain=" << config->base_url;
|
||||||
|
|
||||||
|
if( using_ssl )
|
||||||
|
headers << "; secure";
|
||||||
|
|
||||||
|
headers << "\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -126,7 +131,12 @@ void Request::SetCookie(const char * name, long value, tm * expires)
|
||||||
if( expires )
|
if( expires )
|
||||||
headers << "; expires=" << DateToStrCookie(expires) << " GMT";
|
headers << "; expires=" << DateToStrCookie(expires) << " GMT";
|
||||||
|
|
||||||
headers << "; path=/; domain=" << config->base_url << "\r\n";
|
headers << "; path=/; domain=" << config->base_url;
|
||||||
|
|
||||||
|
if( using_ssl )
|
||||||
|
headers << "; secure";
|
||||||
|
|
||||||
|
headers << "\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue