本文整理了Java中org.eclipse.jetty.server.Response.addSetCookie
方法的一些代码示例,展示了Response.addSetCookie
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.addSetCookie
方法的具体详情如下:
包路径:org.eclipse.jetty.server.Response
类名称:Response
方法名:addSetCookie
[英]Format a set cookie value
[中]设置cookie值的格式
代码示例来源:origin: theonedev/onedev
@Override
public void addCookie(Cookie cookie)
{
String comment = cookie.getComment();
boolean httpOnly = false;
if (comment != null)
{
int i = comment.indexOf(HTTP_ONLY_COMMENT);
if (i >= 0)
{
httpOnly = true;
comment = comment.replace(HTTP_ONLY_COMMENT, "").trim();
if (comment.length() == 0)
comment = null;
}
}
addSetCookie(cookie.getName(),
cookie.getValue(),
cookie.getDomain(),
cookie.getPath(),
cookie.getMaxAge(),
comment,
cookie.getSecure(),
httpOnly || cookie.isHttpOnly(),
cookie.getVersion());
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.server
@Override
public void addCookie(Cookie cookie)
{
String comment = cookie.getComment();
boolean httpOnly = false;
if (comment != null)
{
int i = comment.indexOf(HTTP_ONLY_COMMENT);
if (i >= 0)
{
httpOnly = true;
comment = comment.replace(HTTP_ONLY_COMMENT, "").trim();
if (comment.length() == 0)
comment = null;
}
}
addSetCookie(cookie.getName(),
cookie.getValue(),
cookie.getDomain(),
cookie.getPath(),
cookie.getMaxAge(),
comment,
cookie.getSecure(),
httpOnly || cookie.isHttpOnly(),
cookie.getVersion());
}
代码示例来源:origin: Nextdoor/bender
@Override
public void addCookie(Cookie cookie)
{
String comment = cookie.getComment();
boolean httpOnly = false;
if (comment != null)
{
int i = comment.indexOf(HTTP_ONLY_COMMENT);
if (i >= 0)
{
httpOnly = true;
comment = comment.replace(HTTP_ONLY_COMMENT, "").trim();
if (comment.length() == 0)
comment = null;
}
}
addSetCookie(cookie.getName(),
cookie.getValue(),
cookie.getDomain(),
cookie.getPath(),
cookie.getMaxAge(),
comment,
cookie.getSecure(),
httpOnly || cookie.isHttpOnly(),
cookie.getVersion());
}
代码示例来源:origin: Nextdoor/bender
public void addCookie(HttpCookie cookie)
{
addSetCookie(
cookie.getName(),
cookie.getValue(),
cookie.getDomain(),
cookie.getPath(),
cookie.getMaxAge(),
cookie.getComment(),
cookie.isSecure(),
cookie.isHttpOnly(),
cookie.getVersion());;
}
代码示例来源:origin: theonedev/onedev
public void addCookie(HttpCookie cookie)
{
addSetCookie(
cookie.getName(),
cookie.getValue(),
cookie.getDomain(),
cookie.getPath(),
cookie.getMaxAge(),
cookie.getComment(),
cookie.isSecure(),
cookie.isHttpOnly(),
cookie.getVersion());;
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.server
public void addCookie(HttpCookie cookie)
{
addSetCookie(
cookie.getName(),
cookie.getValue(),
cookie.getDomain(),
cookie.getPath(),
cookie.getMaxAge(),
cookie.getComment(),
cookie.isSecure(),
cookie.isHttpOnly(),
cookie.getVersion());;
}
内容来源于网络,如有侵权,请联系作者删除!