/** Constructor */
 public HttpConnection(Connector connector, EndPoint endpoint, Server server) {
   super(endpoint);
   _uri =
       StringUtil.__UTF8.equals(URIUtil.__CHARSET)
           ? new HttpURI()
           : new EncodedHttpURI(URIUtil.__CHARSET);
   _connector = connector;
   HttpBuffers ab = (HttpBuffers) _connector;
   _parser = new HttpParser(ab.getRequestBuffers(), endpoint, new RequestHandler());
   _requestFields = new HttpFields();
   _responseFields = new HttpFields(server.getMaxCookieVersion());
   _request = new Request(this);
   _response = new Response(this);
   _generator = new HttpGenerator(ab.getResponseBuffers(), _endp);
   _generator.setSendServerVersion(server.getSendServerVersion());
   _server = server;
 }
  /* ------------------------------------------------------------ */
  protected HttpConnection(
      Connector connector,
      EndPoint endpoint,
      Server server,
      Parser parser,
      Generator generator,
      Request request) {
    super(endpoint);

    _uri =
        URIUtil.__CHARSET.equals(StringUtil.__UTF8)
            ? new HttpURI()
            : new EncodedHttpURI(URIUtil.__CHARSET);
    _connector = connector;
    _parser = parser;
    _requestFields = new HttpFields();
    _responseFields = new HttpFields(server.getMaxCookieVersion());
    _request = request;
    _response = new Response(this);
    _generator = generator;
    _generator.setSendServerVersion(server.getSendServerVersion());
    _server = server;
  }