public function convert(BrowserKitRequest $request, ServerRequestInterface $baseRequest)
    {
        $stream = $this->createStream($request);
        list($uri, $queryParams) = $this->buildFullUri($request);
        
        if ($baseRequest instanceof ServerRequest) {
            $serverParams = $this->determineServerParams($request, $uri, (array)$queryParams);
            $psrRequest = $baseRequest->withServerParams($request->getServer() + $serverParams);
        } else {
            $psrRequest = $this->setRequestHeaders($baseRequest, $request->getServer());
        }
        
        return $this->setRequestProperties($psrRequest, $request, $stream, $uri, (array)$queryParams);
    }