This repository was archived by the owner on Jan 30, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +21
-12
lines changed Expand file tree Collapse file tree 2 files changed +21
-12
lines changed Original file line number Diff line number Diff line change @@ -34,16 +34,18 @@ class Proxy extends Socket
3434 * @var array
3535 */
3636 protected $ config = array (
37- 'ssltransport ' => 'ssl ' ,
38- 'sslcert ' => null ,
39- 'sslpassphrase ' => null ,
40- 'sslusecontext ' => false ,
41- 'proxy_host ' => '' ,
42- 'proxy_port ' => 8080 ,
43- 'proxy_user ' => '' ,
44- 'proxy_pass ' => '' ,
45- 'proxy_auth ' => Client::AUTH_BASIC ,
46- 'persistent ' => false
37+ 'ssltransport ' => 'ssl ' ,
38+ 'sslcert ' => null ,
39+ 'sslpassphrase ' => null ,
40+ 'sslverifypeer ' => true ,
41+ 'sslallowselfsigned ' => false ,
42+ 'sslusecontext ' => false ,
43+ 'proxy_host ' => '' ,
44+ 'proxy_port ' => 8080 ,
45+ 'proxy_user ' => '' ,
46+ 'proxy_pass ' => '' ,
47+ 'proxy_auth ' => Client::AUTH_BASIC ,
48+ 'persistent ' => false
4749 );
4850
4951 /**
Original file line number Diff line number Diff line change @@ -87,8 +87,8 @@ public function testFallbackToSocket()
8787 ));
8888
8989 $ this ->client ->setUri ($ this ->baseuri . 'testGetLastRequest.php ' );
90- $ res = $ this ->client ->request (Client:: TRACE );
91- if ($ res ->getStatus () == 405 || $ res ->getStatus () == 501 ) {
90+ $ res = $ this ->client ->setMethod (\ Zend \ Http \Request:: METHOD_TRACE )-> send ( );
91+ if ($ res ->getStatusCode () == 405 || $ res ->getStatusCode () == 501 ) {
9292 $ this ->markTestSkipped ('Server does not allow the TRACE method ' );
9393 }
9494
@@ -103,4 +103,11 @@ public function testGetLastRequest()
103103 * the TRACE response
104104 */
105105 }
106+
107+ public function testDefaultConfig ()
108+ {
109+ $ config = $ this ->_adapter ->getConfig ();
110+ $ this ->assertEquals (TRUE , $ config ['sslverifypeer ' ]);
111+ $ this ->assertEquals (FALSE , $ config ['sslallowselfsigned ' ]);
112+ }
106113}
You can’t perform that action at this time.
0 commit comments