Package org.w3c.www.http

Examples of org.w3c.www.http.HttpSetCookieList


     * Adds the specified cookie to the response. It can be called multiple
     * times to set more than one cookie.
     * @param cookie - the Cookie to return to the client
     */
    public void addCookie(Cookie cookie) {
  HttpSetCookieList clist = reply.getSetCookie();
  if (clist == null) {
      HttpSetCookie cookies [] = new HttpSetCookie[1];
      cookies[0] = convertCookie(cookie);
      clist = new HttpSetCookieList(cookies);
  } else {
      clist.addSetCookie(convertCookie(cookie));
  }
  reply.setSetCookie(clist);
    }
View Full Code Here


      }
  } else if (hvalue instanceof HttpRangeList) {
      HttpRangeList rl = (HttpRangeList) hvalue;
      rl.addRange(HttpFactory.parseRange(value));
  } else if (hvalue instanceof HttpSetCookieList) {
      HttpSetCookieList scl = (HttpSetCookieList) hvalue;
      HttpSetCookieList nscl = HttpFactory.parseSetCookieList(value);
      HttpSetCookie scookies[] = nscl.getSetCookies();
      for (int i = 0 ; i < scookies.length ; i++) {
    scl.addSetCookie(scookies[i]);
      }
  } else if (hvalue instanceof HttpTokenList) {
      ((HttpTokenList) hvalue).addToken(value, true);
View Full Code Here

     * a valid HTTP reply.
     */
    public Reply outgoingFilter(Request request, Reply reply)
  throws HttpException
    {
  HttpSetCookieList list = reply.getSetCookie();
  if (list != null) {
      HttpSetCookie [] cooks = list.getSetCookies();
      if (cooks != null) {
    int i = 0;
    while (i < cooks.length) {
        if (cooks[i].getDomain() == null)
      cooks[i].setDomain(request.getURL().getHost());
View Full Code Here

TOP

Related Classes of org.w3c.www.http.HttpSetCookieList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.