Skip to content

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

@xiangzidetiandi

Description

@xiangzidetiandi

服务返回多个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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions