mirror of
https://github.com/cytopia/devilbox.git
synced 2025-06-01 15:10:58 +00:00
Fix IPv6 handling
This commit is contained in:
parent
10571f7b51
commit
025b45c48c
@ -214,11 +214,10 @@ class Httpd extends BaseClass implements BaseInterface
|
|||||||
|
|
||||||
$type = $arr[1];
|
$type = $arr[1];
|
||||||
$prot = $arr[2];
|
$prot = $arr[2];
|
||||||
$addr = '';
|
$addr = ''; // this may contain ':' itself due to IPv6 addresses
|
||||||
for ($i=3; $i<(count($arr)-1); $i++) {
|
for ($i=3; $i<(count($arr)-1); $i++) {
|
||||||
$addr .= $arr[$i];
|
$addr .= $arr[$i];
|
||||||
}
|
}
|
||||||
$addr = $arr[3]; // this may contain ':' itself
|
|
||||||
$port = $arr[count($arr) - 1];
|
$port = $arr[count($arr) - 1];
|
||||||
|
|
||||||
return $prot.'://'.$addr.':'.$port;
|
return $prot.'://'.$addr.':'.$port;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user