Java Code Examples for io.netty.handler.codec.http.cookie.Cookie#domain()

The following examples show how to use io.netty.handler.codec.http.cookie.Cookie#domain() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CookieStoreImpl.java    From vertx-web with Apache License 2.0 5 votes vote down vote up
@Override
public CookieStore put(Cookie cookie) {
  Key key = new Key(cookie.domain(), cookie.path(), cookie.name());
  if (key.domain.equals(Key.NO_DOMAIN)) {
    noDomainCookies.put(key, cookie);
    return this;
  }
  domainCookies.put(key, cookie);
  return this;
}
 
Example 2
Source File: CookieStoreImpl.java    From vertx-web with Apache License 2.0 5 votes vote down vote up
@Override
public CookieStore remove(Cookie cookie) {
  Key key = new Key(cookie.domain(), cookie.path(), cookie.name());
  if (key.domain.equals(Key.NO_DOMAIN)) {
    noDomainCookies.remove(key);
  } else {
    domainCookies.remove(key);
  }
  return this;
}