summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-01-22 21:26:58 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2019-01-22 21:26:58 +0000
commit6553291c66dc999f27934694e4e0f36d6513b807 (patch)
tree8932380e799b53f2883111353e98c1f8c60b666b
parentRemove fractional part from times (diff)
downloadgentoobrowse-2.1.1.tar.bz2
gentoobrowse-2.1.1.tar.xz
gentoobrowse-2.1.1.zip
IceSpider 0.5 string_view updatesgentoobrowse-2.1.1
-rw-r--r--gentoobrowse/src/base.cpp2
-rw-r--r--gentoobrowse/src/user.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/gentoobrowse/src/base.cpp b/gentoobrowse/src/base.cpp
index 5ed5114..e9c3033 100644
--- a/gentoobrowse/src/base.cpp
+++ b/gentoobrowse/src/base.cpp
@@ -12,7 +12,7 @@ namespace GentooBrowse {
common::currentUser(const IceSpider::IHttpRequest * request) const
{
if (auto sid = request->getCookieParam("sessionId")) {
- if (auto s = prx0->getSession(*sid)) {
+ if (auto s = prx0->getSession(std::string(*sid))) {
auto uid = s->variables.find("userId");
if (uid != s->variables.end()) {
return prx1->get(boost::lexical_cast<Ice::Int>(uid->second));
diff --git a/gentoobrowse/src/user.cpp b/gentoobrowse/src/user.cpp
index cf56b43..c764872 100644
--- a/gentoobrowse/src/user.cpp
+++ b/gentoobrowse/src/user.cpp
@@ -35,7 +35,7 @@ namespace GentooBrowse {
auto s = prx0->createSession();
s->variables[USERID] = boost::lexical_cast<std::string>(user->userid);
prx0->updateSession(s);
- request->setCookie(SESSIONID, s->id, IceUtil::None, "/"s);
+ request->setCookie(SESSIONID, s->id, std::nullopt, "/"s);
request->responseRedirect("/user/home", "Authenticated"s);
}
@@ -113,7 +113,7 @@ namespace GentooBrowse {
auto s = prx0->createSession();
s->variables[USERID] = boost::lexical_cast<std::string>(user->userid);
prx0->updateSession(s);
- request->setCookie(SESSIONID, s->id, IceUtil::None, "/"s);
+ request->setCookie(SESSIONID, s->id, std::nullopt, "/"s);
request->responseRedirect("/user/home", "Verified, welcome!"s);
}
@@ -246,7 +246,7 @@ namespace GentooBrowse {
void execute(IceSpider::IHttpRequest * request) const
{
prx0->destroySession(*request->getCookieParam<std::string>(SESSIONID));
- request->setCookie(SESSIONID, std::string(), IceUtil::None, "/"s, false, 0);
+ request->setCookie(SESSIONID, std::string(), std::nullopt, "/"s, false, 0);
request->responseRedirect("/", "Logged out"s);
}