def build_env(client, req)
      rack_env = DefaultRackEnv.dup
      req.fill_rack_env(rack_env)
      rack_env["SERVER_PORT"] ||= @port.to_s
      
      if (rack_env["rack.input"].respond_to? :set_encoding)
        rack_env["rack.input"].set_encoding "ASCII-8BIT"
      end
      
      rack_env["REMOTE_PORT"], rack_env["REMOTE_ADDR"] = Socket::unpack_sockaddr_in(client.getpeername)
      rack_env["REMOTE_PORT"] &&= rack_env["REMOTE_PORT"].to_s
      rack_env["SERVER_PROTOCOL"] = "HTTP/" << req.version.join('.')
      
      return rack_env      
    end
def build_env(client, req)
      rack_env = DefaultRackEnv.dup
      req.fill_rack_env(rack_env)
      rack_env["SERVER_PORT"] ||= @port.to_s
      
      if (rack_env["rack.input"].respond_to? :set_encoding)
        rack_env["rack.input"].set_encoding "ASCII-8BIT"
      end
      
      rack_env["REMOTE_PORT"], rack_env["REMOTE_ADDR"] = Socket::unpack_sockaddr_in(client.getpeername)
      rack_env["REMOTE_PORT"] &&= rack_env["REMOTE_PORT"].to_s
      rack_env["SERVER_PROTOCOL"] = "HTTP/" << req.version.join('.')
      
      return rack_env      
    end
Builds an env object from the information provided. Derived handlers
 can override this to provide additional information.