变更
This commit is contained in:
@@ -387,23 +387,4 @@ class Uri implements UriInterface
|
||||
return $this->scheme . '://x.x.x.x:' . $this->port . '/' . $this->path . '?' . $this->queryString;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Swoole\Http\Request $request
|
||||
* @return UriInterface
|
||||
*/
|
||||
public static function parse(\Swoole\Http\Request $request): UriInterface
|
||||
{
|
||||
$uri = new static();
|
||||
$uri->queryString = $request->server['query_string'] ?? '';
|
||||
$uri->path = $request->server['path_info'];
|
||||
$uri->port = $request->server['server_port'];
|
||||
if (isset($request->server['https']) && $request->server['https'] !== 'off') {
|
||||
$uri->scheme = 'https';
|
||||
} else {
|
||||
$uri->scheme = 'http';
|
||||
}
|
||||
return $uri;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user