MCPcopy Create free account
hub / github.com/diyhi/bbs / readCookieMap

Method readCookieMap

src/main/java/cms/utils/WebUtil.java:254–265  ·  view source on GitHub ↗
(HttpServletRequest request)

Source from the content-addressed store, hash-verified

252 }
253
254 protected static Map<String, Cookie> readCookieMap(HttpServletRequest request) {
255 Map<String, Cookie> cookieMap = new HashMap<String, Cookie>();
256 //从request范围读取所有Cookie
257 Cookie[] cookies = request.getCookies();
258 if (null != cookies) {//如果Cookie不为空
259 for (int i = 0; i < cookies.length; i++) {//循环所有Cookie
260 //将Cookie放进Map集合里(cookie名称,cookie)
261 cookieMap.put(cookies[i].getName(), cookies[i]);
262 }
263 }
264 return cookieMap;
265 }
266
267
268

Callers 2

getCookieMaxAgeMethod · 0.95
getCookieByNameMethod · 0.95

Calls 2

putMethod · 0.80
getNameMethod · 0.45

Tested by

no test coverage detected