docs: protected Cookie getCookieFromRequest(String name, HttpServletRequest request) {
          final Cookie[] cookies = request.getCookies();
          if (cookies == null) { // getCookies() returns null if there aren't any
              return null;
          }
  
          for (final Cookie cookie : cookies) {
              if (name.equals(cookie.getName())) {
                  return cookie;
              }
          }
  
          return null;
      }