Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge pull request zendframework/zendframework#2150 from postalservic…
Browse files Browse the repository at this point in the history
…e14/hotfix/ZF2-458

[WIP][RC4] SSL new options are not inherited in Socket subclasses
  • Loading branch information
Maks3w committed Aug 13, 2012
2 parents f329014 + 1db9cc9 commit e89d79b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
22 changes: 12 additions & 10 deletions src/Client/Adapter/Proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,18 @@ class Proxy extends Socket
* @var array
*/
protected $config = array(
'ssltransport' => 'ssl',
'sslcert' => null,
'sslpassphrase' => null,
'sslusecontext' => false,
'proxy_host' => '',
'proxy_port' => 8080,
'proxy_user' => '',
'proxy_pass' => '',
'proxy_auth' => Client::AUTH_BASIC,
'persistent' => false
'ssltransport' => 'ssl',
'sslcert' => null,
'sslpassphrase' => null,
'sslverifypeer' => true,
'sslallowselfsigned' => false,
'sslusecontext' => false,
'proxy_host' => '',
'proxy_port' => 8080,
'proxy_user' => '',
'proxy_pass' => '',
'proxy_auth' => Client::AUTH_BASIC,
'persistent' => false
);

/**
Expand Down
11 changes: 9 additions & 2 deletions test/Client/ProxyAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ public function testFallbackToSocket()
));

$this->client->setUri($this->baseuri . 'testGetLastRequest.php');
$res = $this->client->request(Client::TRACE);
if ($res->getStatus() == 405 || $res->getStatus() == 501) {
$res = $this->client->setMethod(\Zend\Http\Request::METHOD_TRACE)->send();
if ($res->getStatusCode() == 405 || $res->getStatusCode() == 501) {
$this->markTestSkipped('Server does not allow the TRACE method');
}

Expand All @@ -103,4 +103,11 @@ public function testGetLastRequest()
* the TRACE response
*/
}

public function testDefaultConfig()
{
$config = $this->_adapter->getConfig();
$this->assertEquals(TRUE, $config['sslverifypeer']);
$this->assertEquals(FALSE, $config['sslallowselfsigned']);
}
}

0 comments on commit e89d79b

Please sign in to comment.