This commit is contained in:
@@ -352,7 +352,7 @@ public class HttpRequest extends Request<HttpContext> {
|
|||||||
public String getSessionid(boolean create) {
|
public String getSessionid(boolean create) {
|
||||||
String sessionid = getCookie(SESSIONID_NAME, null);
|
String sessionid = getCookie(SESSIONID_NAME, null);
|
||||||
if (create && (sessionid == null || sessionid.isEmpty())) {
|
if (create && (sessionid == null || sessionid.isEmpty())) {
|
||||||
sessionid = ((HttpContext) context).createSessionid();
|
sessionid = context.createSessionid();
|
||||||
this.newsessionid = sessionid;
|
this.newsessionid = sessionid;
|
||||||
}
|
}
|
||||||
return sessionid;
|
return sessionid;
|
||||||
@@ -368,6 +368,18 @@ public class HttpRequest extends Request<HttpContext> {
|
|||||||
return newsessionid;
|
return newsessionid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指定值更新sessionid
|
||||||
|
*
|
||||||
|
* @param newsessionid 新sessionid值
|
||||||
|
*
|
||||||
|
* @return 新的sessionid值
|
||||||
|
*/
|
||||||
|
public String changeSessionid(String newsessionid) {
|
||||||
|
this.newsessionid = newsessionid == null ? context.createSessionid() : newsessionid.trim();
|
||||||
|
return newsessionid;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 使sessionid失效
|
* 使sessionid失效
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user