private function normalizePathWithAuthority(Authority $authority = null)
    {
        $path_string = $this->collapseStartingSlashes($this->data, $authority);

        $path_string = new StringHelper($path_string);

        if (!empty((string) $authority)) {
            if (!$path_string->startsWith("/")) {
                $path_string = "/" . $this->data;
            }
        }

        return (string) $path_string;
    }