Package org.w3c.www.http

Examples of org.w3c.www.http.HttpExt


      Reply error = request.makeReply(HTTP.NOT_EXTENDED) ;
      HtmlGenerator content = new HtmlGenerator("Error");
      content.append("<h1>Mandatory extension(s) not supported:",
         "</h1><p>\n");
      content.append("<ul>\n");
      HttpExt exts[] = cman.getHttpExts();
      for (int i=0 ; i < exts.length ; i++)
    content.append("<li> "+exts[i].getName()+"\n");
      content.append("</ul>\n");
      error.setStream(content);
      return error;
View Full Code Here


  } else if (hvalue instanceof HttpEntityTagList) {
      HttpEntityTagList etl = (HttpEntityTagList) hvalue;
      etl.addTag(HttpFactory.parseETag(value));
  } else if (hvalue instanceof HttpExtList) {
      HttpExtList el = (HttpExtList) hvalue;
      el.addHttpExt(new HttpExt(value, false));
  } else if (hvalue instanceof HttpCookieList) {
      // shouldn't be used, but who knows?
      HttpCookieList cl  = (HttpCookieList) hvalue;
      HttpCookieList ncl = HttpFactory.parseCookieList(value);
      HttpCookie scookies[] = ncl.getCookies();
View Full Code Here

  HttpExtList list = reply.getExtList(HTTP_EXT_ID);
  if (list == null) {
      list = new  HttpExtList(httpextlist);
      reply.setHttpExtDecl(list);
  }
  HttpExt ext = list.getHttpExt(HTTP_EXT_ID);
  reply.setExtensionHeader(ext,
         PROFILE_WARNING_HEADER,
         ccppwarning.toString());
    }
View Full Code Here

  //Mandatory End-to-End
  extl = request.getHttpManExtDecl();
  if (extl != null) {
      reply_extl = new HttpExtList(extl);
      reply.setHttpManExtDecl(reply_extl);
      HttpExt exts[]  = extl.getHttpExts();
      HttpExt rexts[] = reply_extl.getHttpExts();
      for (int i=0; i < exts.length; i++) {
    HttpExt     ext         = exts[i];
    Dictionary  headers     = request.getExtensionHeaders(ext);
    Enumeration e           = headers.keys();
    String      resp_header = "";
    while (e.hasMoreElements()) {
        String name = (String) e.nextElement();
        HeaderValue value = (HeaderValue)headers.get(name);
        resp_header+="["+name+": "+value.toExternalForm()+"] ";
    }
    reply.setExtensionHeader(rexts[i], "receipt", resp_header);
      }
      if (rexts.length > 0)
    reply.setEnd2EndExtensionAcknowledgmentHeader();
  }

  //Mandatory Hop-by-Hop
  extl = request.getHttpCManExtDecl();
  if (extl != null) {
      reply_extl = new HttpExtList(extl);
      reply.setHttpCManExtDecl(reply_extl);
      HttpExt exts[]  = extl.getHttpExts();
      HttpExt rexts[] = reply_extl.getHttpExts();
      for (int i=0; i < exts.length; i++) {
    HttpExt     ext         = exts[i];
    Dictionary  headers     = request.getExtensionHeaders(ext);
    Enumeration e           = headers.keys();
    String      resp_header = "";
    while (e.hasMoreElements()) {
        String name = (String) e.nextElement();
        HeaderValue value = (HeaderValue)headers.get(name);
        resp_header+="["+name+": "+value.toExternalForm()+"] ";
    }
    reply.setExtensionHeader(rexts[i], "receipt", resp_header);
      }
      if (rexts.length > 0)
    reply.setHopByHopExtensionAcknowledgmentHeader();
  }

  //Optionnal End-to-End
  extl = request.getHttpOptExtDecl();
  if (extl != null) {
      reply_extl = new HttpExtList(extl);
      reply.setHttpOptExtDecl(reply_extl);
      HttpExt exts[]  = extl.getHttpExts();
      HttpExt rexts[] = reply_extl.getHttpExts();
      for (int i=0; i < exts.length; i++) {
    HttpExt     ext         = exts[i];
    Dictionary  headers     = request.getExtensionHeaders(ext);
    Enumeration e           = headers.keys();
    String      resp_header = "";
    while (e.hasMoreElements()) {
        String name = (String) e.nextElement();
        HeaderValue value = (HeaderValue)headers.get(name);
        resp_header+="["+name+": "+value.toExternalForm()+"] ";
    }
    reply.setExtensionHeader(rexts[i], "receipt", resp_header);
      }
  }

  //Optionnal Hop-by-Hop
  extl = request.getHttpCOptExtDecl();
  if (extl != null) {
      reply_extl = new HttpExtList(extl);
      reply.setHttpCOptExtDecl(reply_extl);
      HttpExt exts[]  = extl.getHttpExts();
      HttpExt rexts[] = reply_extl.getHttpExts();
      for (int i=0; i < exts.length; i++) {
    HttpExt     ext         = exts[i];
    Dictionary  headers     = request.getExtensionHeaders(ext);
    Enumeration e           = headers.keys();
    String      resp_header = "";
    while (e.hasMoreElements()) {
        String name = (String) e.nextElement();
View Full Code Here

TOP

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

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.