/**
   * Parse and record the connection parameters related to this request.
   *
   * @param socket The socket on which we are connected
   * @exception IOException if an input/output error occurs
   * @exception ServletException if a parsing error occurs
   */
  private void parseConnection(Socket socket) throws IOException, ServletException {

    if (debug >= 2)
      log(
          "  parseConnection: address="
              + socket.getInetAddress()
              + ", port="
              + connector.getPort());
    ((HttpRequestImpl) request).setInet(socket.getInetAddress());
    if (proxyPort != 0) request.setServerPort(proxyPort);
    else request.setServerPort(serverPort);
    request.setSocket(socket);
  }