Project

General

Profile

Bug #1445 ยป cookie-expired-no-tr.diff

patch - Boris Nagaev, 09/26/2012 01:58 AM

View differences:

src/web/WebRenderer.C
#include <boost/lexical_cast.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/date_time/posix_time/posix_time_io.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <map>
#include "Wt/WApplication"
......
<< "; Version=1;";
if (!cookie.expires.isNull()) {
std::string d
= cookie.expires.toString(WString::fromUTF8
("ddd, dd-MMM-yyyy hh:mm:ss 'GMT'")).toUTF8();
header << " Expires=" << d << ';';
using namespace boost::posix_time;
time_facet* facet = new time_facet("%a, %d-%b-%Y %H:%M:%S 'GMT'");
std::stringstream expires;
expires.imbue(std::locale(expires.getloc(), facet));
expires << cookie.expires.toPosixTime();
header << " Expires=" << expires.str() << ';';
}
if (!cookie.domain.empty())
    (1-1/1)