/**
* 从request 中取出 cookie
*/
private String getUgcCookie(HttpServletRequest request) {
String ugcInfo = null;
try {
Cookie[] cookies = request.getCookies();
if (cookies == null) {
return null;
}
for (Cookie cookie : cookies) {
if (CookieConst.COOKIE_UGC.equals(cookie.getName())) {
ugcInfo = cookie.getValue();
}
}
} catch (Throwable e) {
logger.error("getUgcCookie error, [msg = {}]", e.getMessage(), e);
}
return ugcInfo;
}