protected function merge($path)
    {
        // 5.2.3.  Merge Paths
        if ($this->host !== null && $this->path == '') {
            return '/'.$path;
        }

        $pos = strrpos($this->path, '/');
        if ($pos === false) {
            return $path;
        }
        return substr($this->path, 0, $pos + 1).$path;
    }