overtrue / flysystem-cos

:floppy_disk: Flysystem adapter for the Qcloud COS storage.
74 stars 10 forks source link

parse_url 函数返回的 path 部分可能以斜杠开头导致 url 中出现重复斜杠 / #7

Closed lddtime closed 4 years ago

lddtime commented 4 years ago
return \sprintf('%s/%s?%s', \rtrim($this->config['cdn'], '/'), urldecode($url['path']), $url['query']);
                   ^
          // 这个斜杠可能重复

PHP: sprintf - Manual

$url = 'http://username:password@hostname/path?arg=value#anchor';

echo parse_url($url, PHP_URL_PATH); // /path
overtrue commented 4 years ago

感谢

lddtime commented 4 years ago

秒回呀 😄