Use $host parameter

This commit is contained in:
Richard van den Berg 2015-03-20 11:30:15 +01:00 committed by mark_story
parent 9e6b1b6930
commit 1f7b787236

View file

@ -724,11 +724,11 @@ class HttpSocket extends CakeSocket {
} }
if (version_compare(PHP_VERSION, '5.6.0', '>=')) { if (version_compare(PHP_VERSION, '5.6.0', '>=')) {
if (empty($this->config['context']['ssl']['peer_name'])) { if (empty($this->config['context']['ssl']['peer_name'])) {
$this->config['context']['ssl']['peer_name'] = $this->request['uri']['host']; $this->config['context']['ssl']['peer_name'] = $host;
} }
} else { } else {
if (empty($this->config['context']['ssl']['SNI_server_name'])) { if (empty($this->config['context']['ssl']['SNI_server_name'])) {
$this->config['context']['ssl']['SNI_server_name'] = $this->request['uri']['host']; $this->config['context']['ssl']['SNI_server_name'] = $host;
} }
} }
} }