Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

服务返回多个ip导致请求的地址错误 #4

Open
xiangzidetiandi opened this issue Mar 6, 2019 · 0 comments
Open

服务返回多个ip导致请求的地址错误 #4

xiangzidetiandi opened this issue Mar 6, 2019 · 0 comments

Comments

@xiangzidetiandi
Copy link
Contributor

服务返回多个ip是会导致拼接出来的地址中包含多个ip报 Resource id #9; cURL error: Illegal characters found in URL (3Array ( [url] => http://100.100.30.17 100.100.103.3:8080/diamond-server/config.co?

修复方案如下
文件名:Client.php
public function refreshServerList(){
$this->serverList = array();
$serverRawList = $this->getServerListStr();
if(is_string($serverRawList)){
$serverArray = explode("\n", $serverRawList);
$serverArray = array_filter($serverArray);

\n由单引号修改成双引号 并增加 array_filter($serverArray);

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant