mirror of https://github.com/adamdruppe/arsd.git
session class that compiles lol
This commit is contained in:
parent
fdc8193c76
commit
992b887559
5
web.d
5
web.d
|
@ -84,6 +84,7 @@ module arsd.web;
|
||||||
document (default), json, none
|
document (default), json, none
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import std.exception;
|
||||||
public import arsd.dom;
|
public import arsd.dom;
|
||||||
public import arsd.cgi; // you have to import this in the actual usage file or else it won't link; surely a compiler bug
|
public import arsd.cgi; // you have to import this in the actual usage file or else it won't link; surely a compiler bug
|
||||||
import arsd.sha;
|
import arsd.sha;
|
||||||
|
@ -2024,7 +2025,7 @@ class Session {
|
||||||
auto tmp = uniform(0, int.max);
|
auto tmp = uniform(0, int.max);
|
||||||
token = to!string(tmp);
|
token = to!string(tmp);
|
||||||
|
|
||||||
cgi.setLoginCookie("_sess_id", token);
|
setLoginCookie(cgi, "_sess_id", token);
|
||||||
}
|
}
|
||||||
_sessionId = getDigestString(cgi.remoteAddress ~ "\r\n" ~ cgi.userAgent ~ "\r\n" ~ token);
|
_sessionId = getDigestString(cgi.remoteAddress ~ "\r\n" ~ cgi.userAgent ~ "\r\n" ~ token);
|
||||||
|
|
||||||
|
@ -2071,7 +2072,7 @@ class Session {
|
||||||
|
|
||||||
void set(string key, string value) {
|
void set(string key, string value) {
|
||||||
data[key] = value;
|
data[key] = value;
|
||||||
hasData = true;
|
_hasData = true;
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue